Ubaid
Posts: 4
Joined: Tue Sep 16, 2014 9:00 am

ODBC Connection error

Hi,

I'm having following error while testing MySQL connection:

[SQLDriverConnect] {SQL_STATE: IM002} [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

Can anyone tell me why I'm getting this error. I followed these tutorials http://www.advancedinstaller.com/user-g ... l-sql.html and http://www.advancedinstaller.com/user-g ... ction.html.

Thanks in advance for your help.
Ubaid
Posts: 4
Joined: Tue Sep 16, 2014 9:00 am

Re: ODBC Connection error

I'm waiting for your kind support. Please help me in resolving this.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: ODBC Connection error

Hello Malik,

The related ODBC error is usually thrown when on target machine is not installed the ODBC driver you are specifying in your SQL Connection parameters (Driver=[\{]MySQL ODBC 5.3 Driver[\}];). Can you please make sure the "MySQL ODBC 5.3 Driver" (32-bit architecture) is installed on target machine. In order to check this you can simply run the "C:\Windows\System32\odbcad32.exe" file (on 32-bit machines) and check your currently installed drivers from "Drivers" tab. On 64-bit machines you should run the "C:\Windows\SysWOW64\odbcad32.exe" file in order to check the 32-bit installed drivers.

Also, checking the "SqlConnectionString" property set into your sent project, I've observed that you have added a space character after the Driver=[\{]MySQL ODBC 5.3 Driver[\}] ; parameter. Can you please remove it (just before semicolon - Driver=[\{]MySQL ODBC 5.3 Driver[\}];) and see if the behavior still persists? Just go to "SQLConnectionDlg" dialog, select the [Next>] button and edit the existing "Set installer property value" published event to like this:
  • Property: [SqlConnectionString]
    Argument: Driver=[\{]MySQL ODBC 5.3 Driver[\}];Server=[SERVER_PROP];Port=[PORT_PROP];Uid=[USERNAME_PROP];Pwd=[PASSWORD_PROP];
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ubaid
Posts: 4
Joined: Tue Sep 16, 2014 9:00 am

Re: ODBC Connection error

Thanks a lot Daniel. It worked.
On 64-bit machines you should run the "C:\Windows\SysWOW64\odbcad32.exe" file in order to check the 32-bit installed drivers.
These drivers are not installed on my machine. Now its working fine after installing these drivers.
space character after the Driver=[\{]MySQL ODBC 5.3 Driver[\}] ; parameter
The SqlConnectionString works well for both i.e. with and without space.

Thanks again for your help.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: ODBC Connection error

You're always welcome Malik.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”