Making 2 connections simultaneously

  • Thread starter Thread starter Louis
  • Start date Start date
L

Louis

Hi

I am using a MySQl backend with access2k frontend. I am trying to build a
way for the user to have a temporary offline version of the data stored into
the mdb file. So a copy of the MySQL table has been placed in Acces (ive
sorted out the column types so they match exactly. I need statement in VB
that will allow me to do it quickly and easily.

My main block is that the two tables are on different connections but ado
only allows one connection in an execution.
ie.

Dim rst as adodb.recordset
set rst = new adodb.recordset
rst.activeconnectionm = currentProject.connection
rst.open "INSERT INTO tbl_temp2 (fld_id)
SELECT tbl_temp1.fld_order_id
FROM tbl_temp1

The tbl_temp1 table is not in the currentProject.Connection - its in
mysqldbconnection
 
1) Also create a Link to the MySQL table. The Link will be in the
MDB, and can be used by the A2K connection. The Link handles the
connection to the MsSQL database. This is an ODBC connection.

or

2) Embed an ODBC connection into the SQL string. Instead of naming
the MySQL table, use a fully qualified tablename, with the fully
dsn/server/database string" ...FROM [ODBC;database=....].[tblname]

(david)
 
Back
Top