Unanswered: SQL Server Select Into Local Access DB
I am having trouble figuring out how to accomplish this task. I need a way to run a select statement on a table on a SQL Server (on a network) and put the results in a access database on another computer on the network. I am using ADO with C++. The access database will already be created on the target computer and will have a replica of the table that the select statement is occuring on.
Currently, I create a connection to the SQL server and create a RecordSet that has the needed records selected using the select statement. I also have a connection to the local access database. I am looking for a way to do a select into or insert into on the RecordSet for the SQL Server and put the results in the local access database. This code would be run from the computer that the access database needs to be created on.
The pSrc and pTrg are Ado Record Set classes objects. After I finish the Column setup I finish the setup and execute the DTS. If I skip the Date column the DTS works and if I include it, the DTS fails.