Hi Everyone,
I'm fairly new to VBA and accessing external databases, and have a couple of questions. I am working on an Access db that I what to query several different Oracle db's through ODBC. The Access db will import several tables from a specific db on command. I have written the following code to connect to one of the Oracle db's.
I have tested this code and it does appear to connect. My thought here is once the code has run, I can reference Albion to access the Oracle db. Is this correct?
Also, once I have connected, I need to import specific tables from the db through VBA. The tables I will be importing will need to update/overwrite existing tables. Any ideas?
If anyone knows of any good sites/tutorials/books that deal with this I would greatly appreciate that as well.
I'm fairly new to VBA and accessing external databases, and have a couple of questions. I am working on an Access db that I what to query several different Oracle db's through ODBC. The Access db will import several tables from a specific db on command. I have written the following code to connect to one of the Oracle db's.
Code:
Public Sub ConnectAlbion()
Dim Albion As Database
Set Albion = OpenDatabase("ACD",dbDriverComplete, True, "ODBC; DSN=ACD;UID=xxx;PWD=xxx")
End Sub
I have tested this code and it does appear to connect. My thought here is once the code has run, I can reference Albion to access the Oracle db. Is this correct?
Also, once I have connected, I need to import specific tables from the db through VBA. The tables I will be importing will need to update/overwrite existing tables. Any ideas?
If anyone knows of any good sites/tutorials/books that deal with this I would greatly appreciate that as well.