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!

rgr
Posts: 6
Joined: Wed Jan 30, 2013 1:28 pm

Dynamically create ODBC

I want to generate the name of the ODBC dynamically. The name field of the ODBC isn't a formatted field so I cannot use this field to fill it with a value from a property. How can I do this. Anybody knows how to accomplish this?
schwarzsurfer
Posts: 49
Joined: Wed Feb 10, 2016 11:06 am

Re: Dynamically create ODBC

I have the same problem. Didn't find a solution... the only idea I have would be a direct reg add with the properties as name and so on...

32bit:

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\yourodbcname]
"Driver"="C:\\WINNT\\System32\\sqlsrv32.dll"
"Description"="yourodbcname"
"Server"="Server"
"Database"="Databsename"
"LastUser"="username"
"Language"="yourlanguage"

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"yourodbcname"="SQL Server"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo]
"servername"="DBMSSOCN,servername,1433"
64bit:

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\yourodbcname]
"Driver"="C:\\Windows\\system32\\SQLSRV32.dll"
"Description"="yourodbcname"
"Server"="Server"
"Database"="Databsename"
"LastUser"="username"
"Language"="yourlanguage"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources]
"yourodbcname"="SQL Server"
Marian
Ich weiß, dass ich nichts weiß!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Dynamically create ODBC

Hello,

Currently our ODBC driver installation feature uses the Windows Installer "ODBCDriver" table to install and configured the ODBC drivers. Unfortunately the "Driver" column of the "ODBCDriver" table is not of formatted type, therefore I'm afraid you cannot set the driver name using a formatted reference.

As a workaround you can indeed use our "Registry" page to create the driver installation registries.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rgr
Posts: 6
Joined: Wed Jan 30, 2013 1:28 pm

Re: Dynamically create ODBC

Thanks all for your answers. I'm going to give it a try....

Return to “Building Installers”