Setting up SQL Settings - ODBC Error 8 - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Setting up SQL Settings - ODBC Error 8

Hello,

I am packaging a software which users SQL Server 2005 Express Edition. It works fine up to installing the SQL Server as prerequisite and installation dialogs. I want the users to set the SQL settings. I added the default SQL settings window and I want the user to set all the settings except ODBC Resource. The user have to give in the port number, database name, username, password and server name (localhost or remote IP address). I also set it to disable the firewall for the specific port the user give in. Also in case the DB does not exists the installer must create it. I also added the SQL script for this one.

I followed the instruction shown in the Advanced Installer online help (link: "http://www.advancedinstaller.com/user-g ... l-sql.html"

However, when it is being installed I get ODBC Error 8 message. ?
K
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Setting up SQL Settings - ODBC Error 8

Hello,

The likely cause is there is something in your SQL Script that is causing this.
The following is a list of ODBC Error Codes. Perhaps it might help you narrow down the cause:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Also, since you are installing the server, you should make sure it is properly installed and running before executing any SQL Scripts.
As for using properties in the SQL Server's command line, that is possible as long as the prerequisite is set up as Feature Based. You read the port number, database name and so on from the dialogs, store them in properties and use those properties in the prerequisite's command line. Check the SQL Server Installer's command line parameters to make sure you input the parameters in the right format. You should test the command line directly from the CMD to ensure that it is formatted properly. You can then place it in Advanced Installer in the prerequisite's appropriate command line field.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello Gabriel,

Your information helped a lot. Thank You.

Now I am getting this error,

[SQLDriverConnect] {SQL_STATE: IM001}
[Microsoft][ODBC Driver Manager] Driver does not
support this function


As I mentioned I followed the instructions given in the below page,

http://www.advancedinstaller.com/user-g ... l-sql.html

?

Regards
K
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Setting up SQL Settings - ODBC Error 8

Hello,

Please send your .aip project file to support at advancedinstaller dot com so we can investigate the issue.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello,

I have sent my installer file to Advanced Installer support email. The subject line of that email is Setting up SQL Settings - ODBC Error 8.

Thanks in advance for this the help.

Regards
K
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello Gabriel,

Thanks for the email support. It was very helpful. I posted your solution here for others to view.

---------------------------------------------------------------------------

There are a few issues with your setup:
On the ODBC page, select the odbc driver dll, not the setup one (in the File field, you now have APPDIR\myodbc3S.dll selected. Replace it with
APPDIR\myodbc3.dll)

On the SQL Scripts page, you did not set the Connection Type. It appears you are using MySQL, so set the connection type to MySQL.
Make sure the other settings are also correct. Is the port correct?

Please carefully read the following guides:
http://www.advancedinstaller.com/user-g ... ction.html
http://www.advancedinstaller.com/user-g ... l-sql.html
http://www.advancedinstaller.com/user-guide/sql.html

---------------------------------------------------------------------------

I made the changes according to your solution. Now I have another message appearing,

[SQLDriverConnect] {SQL_STATE: HY000}
[MYSQL][ODBC 3.51 Driver]Can't connect to to MySQL
server on 'localhost' (10061)


The "localhost" is server name given by the user in the dialog property. The user can select only the server name or location. Here it is "localhost" which means it is in the current computer. The installer must connect to the database or create a new one if it does not exists. Is the name "localhost'" correct? Or is there any other reason for this message?

Regards
K
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Setting up SQL Settings - ODBC Error 8

Hello,

You might want to make sure the firewall is not blocking the connection, so add a firewall rule through the Windows Firewall page in Advanced Installer allowing the port (use a property field) for both protocols (TCP and UDP). Also add the program to the firewall exceptions if the connection fails when setting the port.

You should also make sure MySQL is running when the connection is being attempted. Check for it manually.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello,

I made the changes in the Firewall section. But still I am getting the same error message. The images below shows how the Firewall settings are set in Advanced Installer,

Image

Image

Image

I use Kaspersky Internet Security 2010 on my computer. I also disabled the firewall from the tool before installing the installer.

Regards
K
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Setting up SQL Settings - ODBC Error 8

Hello,

Did you make sure the server is running and the port you are connecting to is correct?

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello,

Sorry about this late response. Your last solutions seems to correct the issue. I will let you know once I have tested it in other computers.

Thank You
K
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello,

Thank you for your help so far. Now I have something else to ask you. I like to build mixed (32/64) installer. The ODBC DLL files for both environments are different, but with same name. According to installer conditions the DLL files must be in the application folder. How can I set this up? I mean it have to install 32bit DLLs on 32bit machine and 64bit DLLs on 64bit machine. Both files needs to be in the same locations.

Regards
K
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Setting up SQL Settings - ODBC Error 8

Hello,

The following guide discusses the topic of installing different versions of a file depending on the operating system:
http://www.advancedinstaller.com/user-g ... files.html

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello,

Thanks, that's a very cool way to install files in different OS environments. It certainly solved a lot in my project. One more questions after we do this, do we have to change the below setting,

Image

to this one:

Image
?

Regards
K
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Setting up SQL Settings - ODBC Error 8

Hello,

Yes, the package type should be changed to mixed 32/64 bit.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Setting up SQL Settings - ODBC Error 8

Hello,

Thank you for your help so far. You solved many of the issues I faced. In my installer I am setting up SQL with SQL Server 2005 Express Edition. And using muli-environment (32/64) installer. What is the veriosn of the Windows Installer require for this installer to run/install?

Regards
K

Return to “Common Problems”