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
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