Microsoft
Software
Hardware
Network
Question : Error Opening VBScript Connection to MySQL DB
Hello,
I have installed MySQL 5.1 and IIS. I have created a test database & I'm trying to connect to it from a test asp page (written in VBScript)
MySQl 5.1 is newer than previous versions of MySQL that I had used therefore the admin console for it was different when I set up my database & connection.
My DB connection detaiils are as follows
Connection Name: testDB
Hostname: localhost
username:root
password:testdev
The port is set by detault to 3306 also.
When I test the connection within the MySQL workbench admin console itself it works fine.
In My ASP Page I try to open a connection as follows
on Error Resume Next
Dim sConnection, objConn , objRS
'create and open DB Connection
sConnection = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER="&Application("Serv
erConn")&"
; DATABASE="&Application("db
storage")&
"; UID="&Application("userVal
")&";PASSW
ORD="&Appl
ication("p
assval")&"
; OPTION=3"
response.write "connection =" & sConnection & "<BR>>"
Set objConn = Server.CreateObject("ADODB
.Connectio
n")
objConn.Open(sConnection)
If Err.Number <> 0 Then
response.write "error number =" & Err.Number & "<BR>"
response.write "error source =" & Err.Source & "<BR>"
response.write "error line =" & Err.Line & "<BR>"
end if
My Application variables are read in from a Global ASA file.
When I run my ASP page I get errors printed out as follows:
connection =DRIVER={MySQL ODBC 5.1 Driver}; SERVER=testDB@localhost; DATABASE=roboDB; UID=root;PASSWORD=testdev;
OPTION=3
>error number =-2147467259
error source =Microsoft OLE DB Provider for ODBC Drivers
Does anyone happen to see where my error lies (Note I have installed the 5.1 Connector driver ok).
Cheers!
Answer : Error Opening VBScript Connection to MySQL DB
Please check the following link and use the appropriate connection string:
http://www.connectionstrin
gs.com/mys
ql
Random Solutions
what is best editor for oracle?
ical not syncing with exchange 2010 - snow leopard
calling C++ dll function from c#
Cold fusion & SQL CFIF "if variable not present, alt query" problem
Exchange 2003 - new Server - still routing through old smtp virtual server
How do I register Exchange 2010 with Windows Server Backup on Windows Server 2008 R2
acronis disk director server 10
IIS host header and DNS
In a excel document is there a way to view two sheets at the same time (i.e. side by side).
Save Machine and User Accounts in Windows 2008 SBS