Unanswered: Import Oracle table data into MS Access thru Visual Basic 6 code.
Could some one please help me with the above subject?
I am developing an application in Visual Basic 6. In that, I have this
requirement to import an Oracle database table data (only selected
columns) into an MS Access database using Visual Basic 6 Code.
After the table data import, I would use that table as reference
in my VB application and probably use some of the information to
populate into another table.
I would appreciate if you could provide me with any sample code.
I picked up an excellent book called Oracle and Visual Basic Developer's Handbook on clearance at CompUSA (about $25). It is written by Oracle technical analysts, so the code is detailed and always works as expected. I recommend you get it if you are going to be doing much Oracle work.
There are many ways to go about connecting to an Oracle db. However, the one recommended by Oracle is OO4O (Oracle Object for OLE), which allows you the most functionality.
An example of how to connect using OO4O is:
Dim OraSession as OraSession
Dim OraDatabase as OraDatabase
Dim OraDynaset as OraDynaset
Set OraSession = CreateObject (*OracleInProcServer.XOraSession*)
Set OraDatabase = OraSession.OpenDatabase ("v8i", "[user name]/[password]")
You can then use standard SQL statements with the ExecuteSQL function, such as:
Re: Import Oracle table data into MS Access thru Visual Basic 6 code.
Thanks a lot for your reply. I have managed to do it using ADO though
I am not sure if its the most efficient way (I am new to VB6). I would
certainly try to get the book you suggested and check out what's in
there. Thanks again for your suggestion.