If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > oledb or odbc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-28-05, 17:54
chuk chuk is offline
Registered User
 
Join Date: Oct 2004
Posts: 10
oledb or odbc

hello,

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

using vb6:

this connection works...
con.Open "PROVIDER=MSDASQL;DSN=MyDsn"

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?

thanks
Reply With Quote
  #2 (permalink)  
Old 02-28-05, 20:14
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
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
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 03-01-05, 09:51
chuk chuk is offline
Registered User
 
Join Date: Oct 2004
Posts: 10
thanks again
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On