LesStockton
Programmer
I'm trying to connect to MySQL5 from my VB6 app.
My code for connecting to SQLServer works fine. To MySQL5, it doesn't. It doesn't like the provider, but I'm not sure what's wrong and why.
SQLDB is an ADODB.Connection, by the way.
SQLDB.Provider = Provider ' I've tried "MYSQLPROV" and "MYODBC"
End If
Select Case UCase(Provider)
Case MYSQLDB, MYODBCDB
SQLDB.Properties("Location") = ServerName
SQLDB.Properties("User ID").Value = UserName
SQLDB.Properties("Password").Value = Password
SQLDB.CommandTimeout = 300
SQLDB.Open
It blows up when it hits the open, sometimes, saying something's wrong with the provider. Other times, depending on what I use for Provider, it will blow up at setting the first property, saying that Provider is missing.
I know other people are having success with this, so please let me know how to get it to work.
My code for connecting to SQLServer works fine. To MySQL5, it doesn't. It doesn't like the provider, but I'm not sure what's wrong and why.
SQLDB is an ADODB.Connection, by the way.
SQLDB.Provider = Provider ' I've tried "MYSQLPROV" and "MYODBC"
End If
Select Case UCase(Provider)
Case MYSQLDB, MYODBCDB
SQLDB.Properties("Location") = ServerName
SQLDB.Properties("User ID").Value = UserName
SQLDB.Properties("Password").Value = Password
SQLDB.CommandTimeout = 300
SQLDB.Open
It blows up when it hits the open, sometimes, saying something's wrong with the provider. Other times, depending on what I use for Provider, it will blow up at setting the first property, saying that Provider is missing.
I know other people are having success with this, so please let me know how to get it to work.