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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top