Results 1 to 3 of 3

Thread: oledb or odbc

  1. #1
    Join Date
    Oct 2004

    Unanswered: oledb or odbc


    my problem is one connection type works & one does not...

    using vb6:

    this connection works...

    this connection does not...
    con.Open "Provider=PervasiveOLEDB;Data Source=MyDsn"

    it has the following error msg: "unable to connect to the relational engine, is database name and server available?"

    any suggestions are appreciated.

    also, which is faster, odbc or oledb?


  2. #2
    Join Date
    Dec 2001
    Provided Answers: 4
    First, the OLEDB connection should actually be:
    con.Open "Provider=PervasiveOLEDB;Data Source=MyDatabaseName"
    and if it's on a remote server, it should be:
    con.Open "Provider=PervasiveOLEDB;Data Source=MyServerDatabaseName;Location=MyServer"

    Second, neither is faster. Both go to the same mechanism on the engine (the relational engine). So, while ODBC may be a little faster to connect, running queries should be the same.
    Note: This is for V8. For P.SQL 2000i, ODBC is faster than OLEDB because OLEDB parses the SQL statement on the local machine and only sends MKDE calls to the server. THis means that for 2000i, ODBC is faster because the SQL queries are handled at the server for ODBC but not for OLEDB.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Oct 2004
    thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts