Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > MySQL Connection String?

Reply
Thread Tools

MySQL Connection String?

 
 
Rob Meade
Guest
Posts: n/a
 
      02-13-2004
Lo all,

Little bit puzzled, I have a connection string that I usually use for my
apps, has worked up until now quite happily.

I've changed it slightly to work with the MySQL database I am now having to
connect to.


objConnection.Open "DRIVER={MySQL ODBC 3.51 Driver}; UID=<user>;
PASSWORD=<password>; DATABASE=<database>; SERVER=<ip>"

Set objCommand = Server.CreateObject("ADODB.Command")
Set RS = Server.CreateObject("ADODB.Recordset")
objCommand.CommandText = SQL
objCommand.CommandType = adCmdText
Set objCommand.ActiveConnection = objConnection
'RS.Open objCommand,,adOpenKeySet, adLockOptimistic

Set RS = objConnection.Execute("SELECT <column1>, <column2> FROM <table>"

In the above I'd usually use the commented line, but I got errors with it,
so I checked a VERY old connection I used to use on another MySQL database,
and paste in the last line - this now works....

Whilst I'm happy to sit back and enjoy it working I was wondering why the
original one doesn't...

Is there another way rather than doing connection.execute to do the same
thing?

Thanks in advance for any help.

Regards

Rob


 
Reply With Quote
 
 
 
 
Bullschmidt
Guest
Posts: n/a
 
      02-16-2004
http://www.able-consulting.com/MDAC/...roviders.htm#O
LEDBProviderForMySQL

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL-python-1.2.2 install with no mysql washakie Python 4 01-15-2008 08:15 PM
ERROR CLOSING CONNECTION: mysql connection close johnny Python 1 12-08-2006 09:42 PM
"mysql.h: No such file or directory" when building MySQL-python francescomoi@europe.com Python 2 05-11-2005 03:12 PM
DBD:mysql doesn't read mysql option file /etc/my.cnf file JL Perl 0 01-28-2005 03:19 AM
"Pure Python" MySQL module like Net::MySQL Ravi Python 6 07-21-2003 06:53 PM



Advertisments