upsizing

Using Access to do a Make Table query to create a SQL Server table using ODBC connection

只愿长相守 提交于 2020-03-21 10:49:06
问题 I am upsizing an Access 2010 database to SQL server. There is an updatable "Make Table" query that is run to create a table and fill it. Currently, it fills a backend table in another ACCDB file. I have moved all the backend tables to SQL Server and trying to change the query to do make a table on SQL Server. I removed the path to the ACCDB file from the Destination DB property, and put in an ODBC connection string in the Dest Connect Str property. When I run the query, I get the error ODBC

Force SET IDENTITY_INSERT to take effect faster from MS Access

巧了我就是萌 提交于 2019-12-18 09:08:07
问题 I'm working on upsizing a suite of MS Access backend databases to SQL Server. I've scripted the SQL to create the table schemas in SQL Server. Now I am trying to populate the tables. Most of the tables have autonumber primary keys. Here's my general approach: For each TblName in LinkedTableNames 'Create linked table "temp_From" that links to the existing mdb' 'Create linked table "temp_To" that links to the new SQL server table ExecutePassThru "SET IDENTITY_INSERT " & TblName & " ON" db

Force SET IDENTITY_INSERT to take effect faster from MS Access

跟風遠走 提交于 2019-11-29 15:52:30
I'm working on upsizing a suite of MS Access backend databases to SQL Server. I've scripted the SQL to create the table schemas in SQL Server. Now I am trying to populate the tables. Most of the tables have autonumber primary keys. Here's my general approach: For each TblName in LinkedTableNames 'Create linked table "temp_From" that links to the existing mdb' 'Create linked table "temp_To" that links to the new SQL server table ExecutePassThru "SET IDENTITY_INSERT " & TblName & " ON" db.Execute "INSERT INTO temp_To SELECT * FROM temp_From", dbFailOnError ExecutePassThru "SET IDENTITY_INSERT "