If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Connecting via ODBC or OLE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-20-05, 11:56
Hockeyfan Hockeyfan is offline
Registered User
 
Join Date: Dec 2005
Posts: 12
Connecting via ODBC or OLE

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.

Code:
SQLDB.Provider = Provider ' I've tried "MYSQLPROV" and "MYODBC" 

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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On