T
Terry
The database is an Access 2003 ADP. I want to copy data from an Access
database (mdb) table to SQL Server. I can do this using DTS but would prefer
to use an ADO transfer so that I can do extensive data manipulation on
selected fields (plus I am not real flash on DTS). I can get the ADO to read
the Access database but cannot get the SEEK working on the table in SQL
Server. I tried setting the commandtype to TableDirect but this caused an
error. I would appreciate the lines of code to create the recordset ready for
using the SEEK.
I suspect that the ConnectionString Provider I am using is incorrect - using
OleDb.
Code used is:
Set cnnDest = New ADODB.Connection
cnnDest.ConnectionString = "Provider='sqloledb';Data
Source='<servername>';Initial Catalog='<tblname>';Integrated
Security='SSPI';""
cnnDest.Open
Set cmdDest = New ADODB.Command
Set cmdDest.ActiveConnection = cnnDest
cmdDest.CommandType = adCmdTableDirect
cmdDest.CommandText = "tblRequests"
Set RsDest = cmdDest.Execute
Thanks
Terry
database (mdb) table to SQL Server. I can do this using DTS but would prefer
to use an ADO transfer so that I can do extensive data manipulation on
selected fields (plus I am not real flash on DTS). I can get the ADO to read
the Access database but cannot get the SEEK working on the table in SQL
Server. I tried setting the commandtype to TableDirect but this caused an
error. I would appreciate the lines of code to create the recordset ready for
using the SEEK.
I suspect that the ConnectionString Provider I am using is incorrect - using
OleDb.
Code used is:
Set cnnDest = New ADODB.Connection
cnnDest.ConnectionString = "Provider='sqloledb';Data
Source='<servername>';Initial Catalog='<tblname>';Integrated
Security='SSPI';""
cnnDest.Open
Set cmdDest = New ADODB.Command
Set cmdDest.ActiveConnection = cnnDest
cmdDest.CommandType = adCmdTableDirect
cmdDest.CommandText = "tblRequests"
Set RsDest = cmdDest.Execute
Thanks
Terry