
November 17th, 2003, 05:06 AM
|
|
Junior Member
|
|
Join Date: Mar 2003
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
VB6/MySQL
Hi there,
I'm attempting to create a connection to MySQL on localhost - I've setup a DSN, although it isn't included in my code, and I have the MySQL ODBC latest drivers.
The following is what I've found seems to work for most (and is what I've used):
PHP Code:
Private Sub connect_Click()
cn.Provider = "MYSQL"
cn.Properties("Persist Security Info") = True
cn.Properties("Prompt") = adPromptNever
cn.Properties("User ID") = "root"
cn.Properties("Password") = ""
cn.Properties("Extended Properties") = "Driver=mysql;server=localhost;database=fateam;option=1"
cn.Open
connect.Enabled = False
End Sub
Unfortunately I get the runtime error 3706: driver cannot be found or is installed incorrectly.
Well, I know for a fact that it is working since I have another program (server based not by me lol) running and it works fine through the dsn.
Any ideas? Thanks in advance,
Chris
|