Help: Getting a DSN-Less connection to Oracle via DAO 
Author Message
 Help: Getting a DSN-Less connection to Oracle via DAO

Does anybody have any idea why the following code fails with the error
'Reserved error (-7778); there is no message for this error.' on
Opendatabase call.

    Dim db As DAO.Database
    Dim sConnect As String

    sConnect = "ODBC;Driver={Oracle73};DBQ=test_database;UID=demo;PWD=demo;"
    Set db = DBEngine.WorkSpaces(0).OpenDatabase("", False, False, sConnect)

    Msgbox "Connected", vbInformation

    db.Close

    Set db = Nothing

If I try using the Microsoft ODBC Driver for Oracle using the following
code, I get the error: ODBC--connection to '{Microsoft ODBC Driver for
Oracle}test_database' failed. Here is the code for that:

    sConnect = "ODBC;Driver={Microsoft ODBC Driver for
Oracle};Server=test_database;UID=demo;PWD=demo;"
    Set db = DBEngine.Workspaces(0).OpenDatabase("", False, False, sConnect)

    Debug.Print db.Connect

    db.Close

    Set db = Nothing

Any help would be appreciated.

Shariq Khan



Mon, 10 Sep 2001 03:00:00 GMT  
 Help: Getting a DSN-Less connection to Oracle via DAO
DSN-less connections require Named Pipes.  Check with your Network
Administrators to find out if they use Named Pipes.

Named Pipes are much more common in the world of Novell networks.
I haven't been into any pure NT Server sites that use Named Pipes.
I'm not a network guy, but I've been told that Novell needed Named
Pipes for certain functionality.  NT apparently has that functionality
built-in, therefore it doesn't require Named Pipes.

No doubt, some network savvy person here can give you a much better
(and technical) explanation, but the bottom line is that DSN-less
connections *require* Named Pipes be used on the network.

John Ellard

On Thu, 25 Mar 1999 10:42:35 -0500, "Shariq Khan"

Quote:

>Does anybody have any idea why the following code fails with the error
>'Reserved error (-7778); there is no message for this error.' on
>Opendatabase call.

>    Dim db As DAO.Database
>    Dim sConnect As String

>    sConnect = "ODBC;Driver={Oracle73};DBQ=test_database;UID=demo;PWD=demo;"
>    Set db = DBEngine.WorkSpaces(0).OpenDatabase("", False, False, sConnect)

>    Msgbox "Connected", vbInformation

>    db.Close

>    Set db = Nothing

>If I try using the Microsoft ODBC Driver for Oracle using the following
>code, I get the error: ODBC--connection to '{Microsoft ODBC Driver for
>Oracle}test_database' failed. Here is the code for that:

>    sConnect = "ODBC;Driver={Microsoft ODBC Driver for
>Oracle};Server=test_database;UID=demo;PWD=demo;"
>    Set db = DBEngine.Workspaces(0).OpenDatabase("", False, False, sConnect)

>    Debug.Print db.Connect

>    db.Close

>    Set db = Nothing

>Any help would be appreciated.

>Shariq Khan


John Ellard



Fri, 28 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need Connection string for VB6 DAO DSN-LESS Connections to SQL Server 2000

2. Need Connection string for VB6 DAO DSN-LESS Connections to SQL Server 2000

3. Crystal and ODBC DSN/DSN-less connections - do I need USER DSN or SYSTEM DSN

4. ASP to Informix via dsn-less connection

5. DSN-less connection to Oracle DB

6. DSN-less ODBC Connections (Oracle)

7. Trouble with Oracle, RDO, and DSN-less connections.

8. DSN-less connection to Oracle 7.3?

9. DSN-less connection string for Oracle?

10. DSN-less connection to Oracle DB

11. DSN-less connection to Oracle DB

12. Connect SQL-SERVER via File DSN or DSN LESS

 

 
Powered by phpBB® Forum Software