Hi,
I have need to create a recordset in which I put all the fields matching from an access table and a sql table.
I opened two recordset one (adomdb) with the records coming from my access database and the other (adosql) with the records coming from a sql table.
The code is:
Set objConnectionmdb = CreateObject("ADODB.Connection"
Set objConnectionsql = CreateObject("ADODB.Connection"
Set adomdb = CreateObject("ADODB.Recordset"
Set adosql = CreateObject("ADODB.Recordset"
objConnectionmdb.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\mydatabase.mdb"
adomdb.Open "Select * FROM mytable", objConnectionmdb, 3,3
objConnectionsql.Open "Provider=sqloledb; Network & _
Library=DBMSSOCN ; Data Source=myserver,1433;" & _
"Database=sqldatabase; USER ID=myid ; Password = mypassword"
adosql= .CursorLocation = 3
adosql.Open "Select * FROM mysqltable" ,objConnectionsql,3,3
Now I would like to use these two recordsets to find whic record from both matchs each other.
I do not know if I can create a 3rd recordset using a sql function that joyn the 2 tables.
Is it possible?
Can someone explain me how to do this?
Sorry for my English (I'm not English speaking).
Thank you in advice
I have need to create a recordset in which I put all the fields matching from an access table and a sql table.
I opened two recordset one (adomdb) with the records coming from my access database and the other (adosql) with the records coming from a sql table.
The code is:
Set objConnectionmdb = CreateObject("ADODB.Connection"
Set objConnectionsql = CreateObject("ADODB.Connection"
Set adomdb = CreateObject("ADODB.Recordset"
Set adosql = CreateObject("ADODB.Recordset"
objConnectionmdb.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\mydatabase.mdb"
adomdb.Open "Select * FROM mytable", objConnectionmdb, 3,3
objConnectionsql.Open "Provider=sqloledb; Network & _
Library=DBMSSOCN ; Data Source=myserver,1433;" & _
"Database=sqldatabase; USER ID=myid ; Password = mypassword"
adosql= .CursorLocation = 3
adosql.Open "Select * FROM mysqltable" ,objConnectionsql,3,3
Now I would like to use these two recordsets to find whic record from both matchs each other.
I do not know if I can create a 3rd recordset using a sql function that joyn the 2 tables.
Is it possible?
Can someone explain me how to do this?
Sorry for my English (I'm not English speaking).
Thank you in advice