ODBC Question: How do you connect VB4 to oracle using 16-bit ODBC
We are trying to coonect VB4 to Oracle using 16-bit ODBC. Standard code does not work. Anybody have any ideas? Do we have to use WIN95 APIs or is there standard way to get thru?
Hope this helps: And what "standard way" do you use?
Dim lDB as database
Dim lRS as recordset
Dim I as integer
Set lDB = Workspaces(0).OpenDatabase("", False, False, "ODBC;")
Set lRS = lDB.OpenRecordSet("SELECT * FROM yourtable", dbOpenDynaset, dbSQLPassThrough
Debug.Print "Contents of your query:"
While not lRS.EOF
For I = 0 to lRS.Fields.Count - 1
Debug.Print lRS.Fields(I)
Next I
lRS.MoveNext
Wend
You can use Oracle Objects for OLE which should be on the Client CDs with plenty of help.
I can also give some examples here, just let me know after installing Oracle Objects for OLE if you need examples, but the help that comes with it is pretty good.
0
ramdanAuthor Commented:
We need to use ODBC. Oracle objects for ole is too slow.
Dim lDB as database
Dim lRS as recordset
Dim I as integer
Set lDB = Workspaces(0).OpenDatabase
Set lRS = lDB.OpenRecordSet("SELECT * FROM yourtable", dbOpenDynaset, dbSQLPassThrough
Debug.Print "Contents of your query:"
While not lRS.EOF
For I = 0 to lRS.Fields.Count - 1
Debug.Print lRS.Fields(I)
Next I
lRS.MoveNext
Wend