Discussion Locked

what is the best driver for SQL

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

For a VB front end and a SQL 7 back end what driver is best for the connection string..

there are so many OLE DB choices.

The SQL Server books say use:

Provider= SQLOLEDB
or
Provider = MSDASQL

I'm confused and the text is overwhelming. Can someone break it down for me. I used to use:

Driver=SQL server

thanks

8 replies

by salmonw

Personally I use SQLOLEDB. The MSDASQL provider still uses OLE DB, but I believe it also uses the ODBC driver. Obviously this causes overhead, but it also requires ODBC to be installed on the host machine. OLE DB is a newer technology, use it if you can.

by rlp007

SQLOLEDB is the best.
example:
dim con as new ADODB.Connection
dim str as strong

con.provider = "SQLOLEDB"
con.open "Server=your_server";Database=your_database";Trusted_connection=yes"

see its simple

by rlp007

SQLOLEDB is the best.
example:
dim con as new ADODB.Connection
dim str as strong

con.provider = "SQLOLEDB"
con.open "Server=your_server";Database=your_database";Trusted_connection=yes"

see its simple

by tayfun

ADO uses OLEDB providers to access data. There are many providers for many databases. For SQL Server, you basically have two options:
1. SQL Server OLEDB Provider (SQLOLEDB)
2. ODBC driver (MSDASQL)
ODBC is an older technology than ADO (although it has many similar goals).
For more efficient access, the SQLOLEDB provider is recommended.
The default provider is ODBC (MSDASQL). This is what is being used in your old connection string. When you use ODBC, you must specify either a DSN (data source name) or a driver, server etc.
In summary, you were using ODBC, but you should use OLEDB provider.
Hope these help...

by rlopez

MSDASQL is the OLE-DB Provider for ODBC.
ODBC is slow and you have to go through two layers: OLE-DB and then ODBC making things real slow.
SQLOLEDB is the native OLE-DB driver for SQL Server making it much more efficient.
ADO uses OLE-DB as a low level database access method.

by toms45

the one that works in your environment. Not trying to be flippant, but sometimes, especially with older versions of SQL, you have to jump some hoops to get a reliable connection. I've recently used SQLOLEDB.1 with some success - just couldn't use integrated security=SSPI. Had to create a "throw away" SQL user account just so some older W2K PC's could connect. The links the others provided are a good start. Google for "connection strings" - you'll find several sites that show many connection strings for different versions of SQL, Oracle, MySQL, etc.
Good luck...

This discussion is closed to new replies.