MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 6th, 2003, 10:03 AM
condealmasy condealmasy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 4 condealmasy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem Connecting MySql Through ASP

Hello:

I installed the MYSQL ODBC 3.51 and I've used my Mysql database with Visual Basic programming for quite some time now, and it works great.

But now I have to develop a webpage in ASP.

There seems to be a problem with the connection string:

connection.Open "PROVIDER=MSDASQL;driver={MySQL ODBC 3.51 Driver};server=localhost;uid=user;pwd=password;dat abase=mydb;"

The thing is that this String has worked once or twice and most of the time it doesn't, while the DSN and the database connection in Visual Basic always works.

I have never changed the string, I've used other strings, like the one I read in the whole "Using MyODBC To Access Your MySQL Database Via ASP" article By: Annette Tennison, but still it gives me this error:

Can't find the database source or didn't specify the default driver

I thought that maybe the application "WinMySqladmin Ver 1.4" that comes with the Mysql installation waas the problem, but the problem happens WITH the application running and WITHOUT it.

Many people respond telling me to check the connection string, but I have done that already 1000 times, and it is right, I believe there is a configuration problem with my IIS or the Mysql ODBC.

Any ideas???

Reply With Quote
  #2  
Old January 6th, 2003, 09:47 PM
peeyush peeyush is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: India
Posts: 17 peeyush User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to peeyush
Hi

Try this

1. Make a system dsn on the machine which has MySQL and web server installed. Let say the name of dsn as 'dsn1'. Specify the required information in the dsn.
2. In ASP page write this
cn.ConnectionString = "DSN=dsn1"
cn.Open

Hope this helps

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Problem Connecting MySql Through ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT