Transferring information between disparate connections using ADO.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know how to open a recordset using connection A, then transfer the information into connection B, directly through ADO? Is this possible? Currently, my idiot colleague is doing a line-by-line transfer which copies it out field by field, constructs a single line INSERT INTO command and executes it against connection B. There's got to be a better way

I can use GetRows to get the info out & into an array. Is there an ADO fn which can transfer an array directly into a connection

GPO
 
I've never tried it, but since ADO supports disconnected recordsets, you
could try switching connections.

con1.Open
con2.Open
' - - -
rs.Open strSQL, con1
' - - -
Set rs.ActiveConnection = Nothing
Set rs.ActiveConnection = cn2
' - - -

Like I said, I've never tried it, but see how you go.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html


GPO said:
Does anyone know how to open a recordset using connection A, then transfer
the information into connection B, directly through ADO? Is this possible?
Currently, my idiot colleague is doing a line-by-line transfer which copies
it out field by field, constructs a single line INSERT INTO command and
executes it against connection B. There's got to be a better way.
I can use GetRows to get the info out & into an array. Is there an ADO fn
which can transfer an array directly into a connection?
 
Back
Top