mySQL, asp and iis?

  • The_torst
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jul 28, 2004
  • Posts: 214
  • Loc: Denmark
  • Status: Offline

Post February 23rd, 2006, 1:33 am

Hi guys.

I'm running a few asp (javascript) pages, that need to connect to a mySQL DB. I can connect to the DB through a GUI, that should go well with mySQL; but NOT from my asp pages! It tells me that it can't find the server and that no drivers were specified.

I'm using the following connection string, and can't make out what's wrong with it (I'm not even sure that's the problem though):

"driver={MySQL};server=(serverIP or name);uid=root;pwd=xxxxxxxx;database=DB_name;"

I'm running iis on Win2000.

Is it possible at all to make mySql work with asp and iss? Any ideas as to how?

Thanks, Torst.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 23rd, 2006, 1:33 am

  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post February 23rd, 2006, 5:08 am

Here you go

http://www.google.co.za/search?hl=en&q= ... ring&meta=
My Software Development Company
Music I have recorded (fixed now :))
Image
  • The_torst
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jul 28, 2004
  • Posts: 214
  • Loc: Denmark
  • Status: Offline

Post February 23rd, 2006, 5:30 am

Well that's pretty much what I did; I'm using the DSN-less Method. The only difference is the 'Option' value. I've tried with and without it, and one finds a lot of different values.

Just to make sure:
this connection string is supposed to work; so if mine doesn't, it should be my syntax, right? Taking for granted that the server name is 'SQL_SERVER', the string would be:

"Driver={MySQL ODBC 3.51 Driver}; Server=SQL_SERVER; Database=dbname; UID=username; PWD=password; Option=3"

I'm running MySQL 5.0; would that be a problem when 3.51 Driver is specified?
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post February 23rd, 2006, 5:32 am

Well I am assuming you have set up an ODBC with the name SQL_SERVER right?

If not then look at using another driver as ODBC will look for a name in the datasources reg
My Software Development Company
Music I have recorded (fixed now :))
Image
  • The_torst
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jul 28, 2004
  • Posts: 214
  • Loc: Denmark
  • Status: Offline

Post February 23rd, 2006, 5:40 am

Well MySQL is installed on a server on my network. The name of it is SQL_SERVER.
It's the same server that's running IIS with my asp pages, so I guess it's safe enough to use 'localhost' as server name in the connection string?

Could it have anything to do with the fact that I'm trying to use ROOT as user in the string though?
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post February 23rd, 2006, 5:43 am

Are you trying to run this from your machine or the server that has the mysql installed?
My Software Development Company
Music I have recorded (fixed now :))
Image
  • The_torst
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jul 28, 2004
  • Posts: 214
  • Loc: Denmark
  • Status: Offline

Post February 23rd, 2006, 6:03 am

The asp pages, iis and MySQL are all on one server, called SQL_SERVER.

I look at the asp pages on a client on the same network though.
http://www.dadle.dk/
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post February 23rd, 2006, 6:08 am

Now does SQL_SERVER have an ODBC entry for the MySQL server
My Software Development Company
Music I have recorded (fixed now :))
Image
  • The_torst
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jul 28, 2004
  • Posts: 214
  • Loc: Denmark
  • Status: Offline

Post February 23rd, 2006, 6:13 am

Yes, it does - looks like it's working just fine. SQL statements on the GUI work as they should..
  • Rabid Dog
  • Cheese Monkey
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3188
  • Loc: South Africa
  • Status: Offline

Post February 23rd, 2006, 6:19 am

Can you post the error?
My Software Development Company
Music I have recorded (fixed now :))
Image
  • The_torst
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jul 28, 2004
  • Posts: 214
  • Loc: Denmark
  • Status: Offline

Post February 23rd, 2006, 6:32 am

I'll post both the error and some code when I get back home!
http://www.dadle.dk/

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 166 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.