|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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??? |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Problem Connecting MySql Through ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|