First, the reference, search keyword access SQL, find the http://access911.net/fixhtm/79FAB41E14DC.htm
For beginners, what should I pay attention to when converting access to SQL Server?
The above Article is detailed enough.
I just follow this.
In this case, import the Access database to SQL, right-click the database you created, find the generated SQL script, and generate the script, such as. SQL, open it in a text editor, find and replace it, replace all [int] not null, and so on with [int] identify () not null, because the previous one must be your non-empty primary key, so replace it like this. Replace all smalldatetime with datetime.
In the query analyzer, analyze and execute the preceding. SQL, so the database is certainly empty (don't worry, you can also import data from access again, but now it's not busy, I encountered a problem when using RS. open SQL, Conn, 1, 3 statements (I use ASP), the results also show ADODB. recordset error '800a0cb3'
The current record set cannot be updated. This may be a restriction on the provider or a restriction on the selected lock type. (My server still displays English, Dizzy)
I found the solution on the Internet. I tried it and it is feasible.
=-================= Error message: (SQL Edition)
ADODB. recordset error '800a0cb3' the current record set cannot be updated. This may be a restriction on the provider or a restriction on the selected lock type. /Admin/admin_article.asp, Row 17 error cause: the SQL version does not use the database to query the file to create the relevant table, but directly imports the data in the original access, resulting in a lack of primary keys and indexes for the imported table.
Solution: When importing data from the Access database, you must first execute the database creation Query file to create the relevant table and then import the data. ============== What I did later was to add the key icon to the primary key of each table in the Enterprise Manager (to make it truly a primary key, fortunately, I only have 71 tables), and then "generate SQL script" again. Note that when generating the script, find an option such as generate primary key index in the option, and select the check box, you do not need to set the primary key again. Next we will import the data in the original access, and then debug the ASP program. For more information, see the online references.