Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Expert,


I have one asp website with mysql database.

for database connection i have create odbc foodubai using MySQL ODBC 5.1 Driver

In Mysql/odbc Connector wizard i have mention following description.


Data Source name : foodubai
Server: mysql7.expogr.com
user: foodubai
password : 1234

and database : foodubai

and my database connection string is

SQL
Set objConn = Server.CreateObject("ADODB.Connection")

objConn.Open "Driver ={MySQL ODBC 5.1 Driver}; Server =mysql7.expogr.com; Option =16834; Database =foodubai; user=foodubai; password=1234"


But above line shows following error

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.


what is the problem in connection string?.

Thanks in advance.
Posted
Updated 13-Sep-11 0:00am
v3

From the first glance it seems that the problem can be one of the following :
1. Wrong connection string
Make sure that your connection string is correct in all aspects. User name,
Password, ODBC Name. If it is correct. Go to next step.

2. Correct Target CPU
There are two different ODBC drivers for both 32-bit and 64-bit versions of
OS. So make sure you are compiling you application to correct version. I
would suggest you to change the target CPU in compile options to x86 32 bit.

3. Correct ODBC set up
As I said there are two different ODBC drivers for 32 - bit and 64 - bit.
You can find the 32 - bit ODBC manager at C:\Windows\SysWOW64\odbcad32.exe
and 64 - bit ODBC manager at Start - Admin Tools - Data Sources. So when
you are setting the ODBC, do so at using appropriate manager.
If you are not sure which manager to use. Whatever changes you want to do,
do them using both these ODBC managers.

For further information check out :
1. http://support.microsoft.com/kb/306345[^]

Hope this helps.
All the best.
 
Share this answer
 
v2
Comments
udusat13 13-Sep-11 7:14am    
Thanks..

In MY C:\WINDOWS\system32 folder, i have found odbcad32.exe this file.
Now what i can do?
Now which manager i have to use or i have reinstall odbc for 32 bit.

Please guied me.

Thanks.

 
Share this answer
 
Comments
udusat13 13-Sep-11 6:12am    
Thanks.

But I have already visit this site.
How to remove the error. I odbc created without error.

But error in connection string.
Herman<T>.Instance 13-Sep-11 6:33am    
have you setup ODBC on the OS?
udusat13 13-Sep-11 6:44am    
yes..
I have install odbc.and odbc wizard successfully connect and create odbc.
Herman<T>.Instance 13-Sep-11 6:46am    
see solution 3
The connection string format looks ok, followiing is the connection string to be used with mySQL ODBC Driver:

Driver ={MySQL ODBC 5.1 Driver}; Server =localhost; Database =myDataBase; User =myUsername; Password =myPassword; Option =3;


check the following link for different options:

http://www.connectionstrings.com/mysql#p31[^]

also check this link for troubleshooting:

http://usefulscripts.wordpress.com/2007/10/11/mysql-asp-connection/[^]
 
Share this answer
 
v2
Comments
udusat13 13-Sep-11 6:32am    
Thanks ..

But still it giving sAME ERROR.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900