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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OleDB vs ODBC

Status
Not open for further replies.

Lasius

Programmer
Jul 1, 2002
13
DE
Hi,

I am using the MyODBC driver to connect to a MySQL-Server via ADO and VB.
Now I tried to use the MyOleDB driver which should result in a better performance. Here is the code.

Dim dbconn As ADODB.Connection
Dim adoRecordset As ADODB.Recordset
Set dbconn = New ADODB.Connection
dbconn.Provider = "MySQLProv"
dbconn.Properties("Data Source") = "DSN=TestOleDBMySQL;SERVER=TestServer;DB=TestDB"
dbconn.Properties("User Id") = "testUser"
dbconn.Properties("Password") = "testUser"
dbconn.Open
Set adoRecordset = New Recordset
Set adoRecordset.ActiveConnection = dbconn
adoRecordset.CursorLocation = adUseClient
adoRecordset.LockType = adLockReadOnly
adoRecordset.CursorType = adOpenKeyset
adoRecordset.Open "Select * From TestTable"
Set adoRecordset.ActiveConnection = Nothing

It works but really slowly.
Can somebody tell me why ?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top