Accessing DB via Oracle odbc driver 
Author Message
 Accessing DB via Oracle odbc driver

Hi all,

I have written a Visual Basic application that uses an ODBC connection to
access an Oracle database.  The DSN the program uses was created using the
Microsoft ODBC for Oracle driver (msorcl32.dll version 2.573.6526.0).  With
this Microsoft driver it all works great.

However, when I want my application to use a DSN created with the Oracle
ODBC driver (sqora32.dll version 8.01.06.00) the thing doesn't work anymore.

While debugging my application I learned that establishing an ODBC
connection using the Oracle driver worked fine, but the ODBC call fails
after parsing an SQL query to the DB.

More concrete, my application does something similar to this:

    Dim dbTest As Database
    Dim qdTest As QueryDef
    Dim rsTest As RecordSet
    Dim ConnectString As String, SQLString As String

    ConnectString = "ODBC;DSN=Test;UID=test;PWD=test"
    SQLString = "PARAMETERS p_test TEXT; " & _
                "SELECT field " & _
                "FROM table " & _
                "WHERE test = [p_test]"

    Set dbTest = OpenDatabase("", dbDriverNoPrompt, False, ConnectString)
    Set qdTest = dbTest.CreateQueryDef("", SQLString)

    qdTest.Parameters!p_test = "some value"

    Set rsTest = qdTest.OpenRecordset

And when using the Oracle driver, the ODBC call fail message appears when
the .OpenRecordset statement executes.

Does anybody have an idea why I can't use the Oracle driver when I want to?
Are there any differences/incompatibilities between both?
Thx,
Wim



Mon, 25 Apr 2005 23:26:45 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Oracle ODBC driver / Microsoft ODBC driver for Oracle

2. Access Oracle 7 DB on WinNT via ODBC

3. ODBC to Oracle via supplied Visigenic drivers

4. 32-bit ODBC driver for Oracle via SQL*Net on Windows 95

5. Connecting to Oracle DB via VB (ODBC)...

6. Connecting to an Access 95 database via an ODBC driver in VB 5.0

7. Connecting to an Access 95 database via an ODBC driver in VB 5.0

8. HELP on connection to Oracle with Microsoft ODBC for Oracle Driver

9. Help: Excel VB accessing Oracle via ODBC

10. Oracle access via ODBC

11. Access 2 to Oracle database via ODBC reports error -7751

12. Hit Access 2.0 DB via ODBC (VB4)

 

 
Powered by phpBB® Forum Software