access|server| Data | The database has recently been busy learning to convert Access databases into SQL Server databases, and to share with you a few experiences.
Automatic numbering type in 1.ACCESS database when converting, SQL Server does not set it to AutoNumber, we need to add identity to the SQL creation statement to indicate AutoNumber!
2. When converting, date-related fields, SQL Server defaults to smalldatetime type, we'd better turn it into a datetime, because the range of datetime is larger than the smalldatetime type. I met this situation, with the smalldatetime type, conversion failure, but with the DateTime type, conversion success.
3. The SQL statements that operate on the two databases are not identical, for example, when a record is deleted for an Access database: "Delete * from user where id=10", and the SQL Server database is deleted by: "Delete user Where id=10 ".
4. Date functions are not the same, in the Access database processing, you can use the date (), time () and other functions, but the
In SQL Server database processing, you can use functions such as Datediff,dateadd instead of date (), Time (), and so on.
5. In Access database processing, SQL statements can be directly used in some VB functions, such as the CStr () function, but for SQL Server database processing, but not used.
The above is my actual combat experience, there may be more later, I hope you and I communicate!