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.