ODBC-Connection - 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!

Kyara
Posts: 1
Joined: Thu Sep 20, 2012 3:42 pm

ODBC-Connection

Hallo,

I'm trying to create an installer with the trial-Version of Advanced Installer 9.4 and having some trouble with odbc.
I need to configure an odbc-Connection to a SQLServer 2008 database, on Windows XP. I'm using the SQL Server Driver. When the connection exists on my machine where I create the installer I can import a new DataSource from the Machine Data Sources, but the attributes imported (WSID, UID, PWD, APP, DATABASE, Description) cause the connection to fail. When I remove everything except DSN, it seems to use the existing connection.
However, I need to install on machines where the connection is not already installed and can't figure out how to do it. The necessary attributes for the connection would be DSN, Description, Database, Server, UID and PWD, I think, but I get the error:
Error configuring ODBC_ datasource: <Name>
ODBC error 8: Invalid keyword-value pairs.
Verify that the file <Name> exists and that you can access it.
I checked the Registry, the values I get there aren't any help either, my odbc-connection works fine so the values I insert are okay. Which parameters do I need? I read here that I can't specify UID and PWD for a SQL-Server-Authentication, but how else can I provide theese attributes without user interaction?
And how can I prevent the DeInstaller from removing the existing odbc-connection during uninstall?

Thanks for your help.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: ODBC-Connection

Hello Kyara and welcome to Advanced Installer forums,

Thank you for taking the time to evaluate Advanced Installer.

In order to set up an ODBC connection, you must specify four things:
  • The name of the data source(DSN).
  • The driver used to access the data (e.g SQLServer).
  • The registration type(per user/per machine).
  • The connection attributes: these include all the information required to access the data and are specific to each driver. They are given in the form of "name=value".
The ODBC API takes these attributes in a generic way (in a string containing pairs "name=value"), so Windows Installer has no other way and neither does Advanced Installer.

Also, here's Run SQL Script before ODBC connection thread that debates the error you are getting.
And how can I prevent the DeInstaller from removing the existing odbc-connection during uninstall?
Preserving resources is described in the How do I prevent a file or registry entry from being uninstalled or repaired? article. However, can you please give us more related details?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”