Create local table from ADODB recordset

  • Thread starter Thread starter martyn
  • Start date Start date
M

martyn

I am returning a recordset from a MS Sequel database and
trying to create a local table.

I can return the recordset no problems BUT using
the "SELECT INTO" SQL results in an error as the program
seems to attempt to create a table based on the rst
connection. Is there a way to open the SQL recordset and
then dump all the records into a local table.

ie SELECT * INTO MyLocalTable FROM mySQLrst
 
you can't do like this. you can try either to open 2 recordsets - and copy
data, or link sql table to access and then run SELECT INTO in access
 
Martyn,

Assuming you have the appropriate table setup in the Access database. Then
you could do what you want in one simple SQL statement:

INSERT INTO myLocalAccessTable (Field1, Field2, Field3,...)
(SELECT sqlField1, sqlField2, sqlField3 FROM mySQLServerTable)

Regards,
Dan
 
Back
Top