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

Connecting to MySQL

Status
Not open for further replies.

lucyv

Programmer
Mar 11, 2002
152
US
I'm having a lot of trouble connecting to a MySQL database on my webserver. Everytime I run this code I get this error message:


[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist of access denied. Invalid connection string attribute


Code:
Dim pconConnection As New OleDb.OleDbConnection

With pconConnection                
    .ConnectionString = "PROVIDER=SQLOLEDB;" & _
                        "DRIVER={MySQL ODBC 3.51 Driver};" & _
                        "SERVER=mysql.domain.com;" & _
                        "DATABASE=###;" & _
                        "UID=###;" & _
                        "PWD=###;" & _
                        "OPTION=3;" & _
                        "PORT=3306"
    .Open()
End With

Does anyone see what I am doing wrong?

-lucyv
 
I don't understand. Do I have to download/install the OLEDB Provider for MySQL? I already have an application called MySQL-Front that can connect to my webserver, so I'm assuming I already have the adequate files.

Please help!!!

-lucyv
 
I just downloaded the MyODBC Provider but I'm still having problems. Any help would be greatly appreciated.

-lucyv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top