Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading and writing between two ODBC .mdb

Status
Not open for further replies.

ranshe

Programmer
Oct 5, 2004
27
0
0
US
I have two Access databases (mdb1 & mdb2) that are accessed via ODBC. Both mdb's are in different directories and nether one is in the VB default directory.
I need to know the most efficient way to code for opening each database and reading every row from a table in the first database (mdb1.table1) and writing the rows to a table in the other database (mdb2.table2).
I have tried several ways and they have proved unsuccesful.
Someone told me to open mdb1 and read table1 into an array in memory and then open mdb2 and write from the array.
I am not sure if this is the correct approach or how to do it if it is.
Any advise would help.
Thanks!
 
First source of Jet SQL data is:

Have a look there for the INSERT INTO statement, which allows insertion of single records or complete recordsets (ie another query result) into a table.

There is also normally a copy of JETSQL40.HTM in C:\Program Files\Common Files\Microsoft Shared\Office10\1033 if you have Office installed

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top