p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Databases (http://p2p.wrox.com/forumdisplay.php?f=62)
-   -   Connection String (http://p2p.wrox.com/showthread.php?t=17354)

fs22 August 24th, 2004 01:12 PM

Connection String
 
Greetings,

I am attempting to work on a site using javasript ASP and MySQL. Unfortunately, I cannot seem to get my connection string to work. Here it is...

<%
var adoConn = Server.CreateObject("ADODB.Connection");
adoConn.Open = ("Driver={mySQL}; Server=localhost; Port=3306; Option=0; Socket=; Stmt=; Database=bibletruthchapel_org; Uid=username; Pwd=password;");
%>

Any thoughts?

Clay Hess

sinapra August 24th, 2004 11:37 PM

<%
mycon = "driver={MySQL};server=localhost;uid=user;pwd=pwd; database=bibletruthchapel_org;option=youroption"
Set datacon= Server.CreateObject("ADODB.Connection")
datacon.Open mycon

strQuery = "SELECT * FROM your_table;"
Set RS = datacon.Execute(strQuery)
%>

Whats the error!!!
Try it this way, it works for me.
Regards


sinapra

Robin1 August 26th, 2004 10:41 PM

well, what's the error message?
probably the driver not specified.
for example, Driver={Mysql odbc 3.51 Driver};
search ur own mysql driver for correct odbc version;


gokul_blr August 30th, 2004 01:25 AM

Check this & also privode the Error Messages

 ODBC 2.50 Local database:

"Driver={mySQL};Server=localhost;Option=16834;Data base=mydatabase;"

 ODBC 2.50 Remote database:

"Driver={mySQL};Server=data.domain.com;Port=3306;O ption=131072;Stmt=;Database=my-database;Uid=username;Pwd=password;"

 ODBC 3.51 Local database:

"DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=myDatabase;USER= myUsername;PASSWORD=myPassword;OPTION=3;"

 ODBC 3.51 Remote database:

"DRIVER={MySQL ODBC 3.51 Driver};SERVER=data.domain.com;PORT=3306;DATABASE= myDatabase;USER=myUsername;PASSWORD=myPassword;OPT ION=3;"



All times are GMT -4. The time now is 03:59 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.