Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC vs OLE - Performance?

Status
Not open for further replies.

msc0tt

IS-IT--Management
Jun 25, 2002
281
CA
I've written a VB6 app that makes a DSN-less connection to a SQL2000 DB. After much experimenting, I've got things to work with both ODBC and OLE methods (see below). Presently, the database is small but I would like to maximize efficiently for when it is huge. Is one of these methods a better choice over the other? Why?

ODBC method:
.ConnectionString = "Driver={SQL Server};" & _
"Server=172.16.1.7;" & _
"Address=172.16.1.7,1433;" & _
"Network=DBMSSOCN;" & _
"Database=" & sLocalDB & ";" & _
"Uid=" & sLocalUser & ";" & _
"Pwd=" & sLocalPass

OLE method:
.ConnectionString = "Provider=sqloledb;" & _
"Server=172.16.1.7,1433;" & _
"Network Library=DBMSSOCN;" & _
"Database=" & sLocalDB & ";" & _
"Uid=" & sLocalUser & ";" & _
"Pwd=" & sLocalPass

-with thanks
Mike
 
Microsoft has always stated that OLE-DB is better for performance than ODBC. Just because ODBC is old technology now. Never seen it proven, but it seems everybody believes it.
 
Thanks ClayG. I too had seen reference that OLE was 'newer' but no mention that it was 'faster'. I guess in a Microsoft world, newer has got to be better (gosh, I hope this doesn't start a rant war....).
-cheers.
 
I have also heard that OLE was faster than ODBC. However I haven't ever seen anything that showes that it is faster.

Denny

--Anything is possible. All it takes is a little research. (Me)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top