Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 24th, 2004, 01:12 PM
Friend of Wrox
Join Date: Apr 2004
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connection String


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
Clay Hess
Old August 24th, 2004, 11:37 PM
Authorized User
Join Date: Aug 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sinapra Send a message via MSN to sinapra Send a message via Yahoo to sinapra

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.

Old August 26th, 2004, 10:41 PM
Authorized User
Join Date: Aug 2004
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts

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;

Old August 30th, 2004, 01:25 AM
Friend of Wrox
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr

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;"

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection string MunishBhatia ASP.NET 2.0 Professional 4 May 16th, 2007 05:50 AM
Connection String jmss66 Oracle 4 August 8th, 2006 03:19 AM
Connection String slgknjn VB Databases Basics 2 February 26th, 2005 03:14 AM
Connection string tlamazares SQL Server ASP 1 March 29th, 2004 05:16 PM
Connection String Help. diamond2165 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 7th, 2003 06:09 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.