cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

Running SQL script from InstallShield 2009

I have a SQL script and I have MySQL server installed in my machine. I want to run this SQL script from InstallShield 2009 setup. I am not able to connect MySQL with InstallShield 2009.
I have created a feature and associate this script with this feature.
During Installation, I am getting a window to give Database Server. After giving Database Server, its giving ODBC error. I dont know what to give in database Server name. Please help.


ankur
Labels (1)
0 Kudos
(5) Replies
hidenori
Level 17

If you add a connection and a script in the SQL Scripts view, make sure that you only select the "MySQL" checkbox in the Requirements tab. Please also make sure that you have a MySQL ODBC driver installed on your target machine. In the Server Name field on the SQLLogin dialog, you need to specify a MySQL server name that you want to connect to. If you target a local server, you can use 'localhost'.

Hope that helps.
0 Kudos
Not applicable

Thanks for your solution but the problem is not resolved completely.

I downloaded MySQL ODBC driver mysql-connector-odbc-5.1.5-win32.msi and installed in my destination machine.

I created ODBC Data Source Name for it.

While running Setup.exe from the build created, in the "Database Server" window, after giving the Database Server as created and the authentication credentials, I am getting the following error

"There was an error in to MySQL.
Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)"

Please help.

ankur
0 Kudos
hidenori
Level 17

InstallShield is currently designed to work with the MySQL Connector/ODBC 3.51 driver. Please follow the steps below in order to use the MySQL Connector/ODBC 5.1 driver in InstallShield:

[LIST=1]
  • Go to the ISSQLDBMetaData table in the Direct Editor.
  • Find the MySQL entry.
  • Change the value of the AdoDriverName column to {MySQL ODBC 5.1 Driver}.
  • Rebuild your setup.
    If you want to support both versions, you need to specify {MySQL ODBC 3.51 Driver};{MySQL ODBC 5.1 Driver} in the AdoDriverName column. InstallShield will try to connect using 3.51 first. If the driver is not found, then it will try 5.1.

    Hope this helps.
  • 0 Kudos
    Not applicable

    This works. Thank You. I am able to do connectivity. The errors coming earlier are resolved.

    But my sql script is not executing. I mean to say I have written a very simple sql script to insert some values into a table. This script I have inserted in the SQL wizard. After running setup.exe, the table is not updated with the latest values. Even I am creating a table in the same script. It is also not created. it means the script is not executed.

    Please help.


    ankur
    0 Kudos
    hidenori
    Level 17

    I would suggest that you generate a Windows Installer verbose log for the installation to check whether the script is executed or not. If it is NOT executed, you may be able to find out what is causing it from the installation log. If executed, please make sure that you are verifying on the correct database catalog. If you are using a GUI tool for the verification, you may need to refresh it manually.
    0 Kudos