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!

Rajeshree
Posts: 13
Joined: Thu Sep 05, 2013 12:10 pm

ODBC Connection database not found

Hi,

I have locally created a DSN and added database to it.Driver added is "Driver do Microsoft Access(*.mdb) ".
In AI, added the Data Source and it's appropriate arguments.
But, when i run the application it gives " database not found in registry".
But the ODBC has been added under the regsitry i.e HKLM\Software\ODBC\ODBC.INI
Please provide some detail steps regarding this issue.

Thanks and Regards,
Rajeshree B
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: ODBC Connection database not found

Hi Rajeshree,

I'm not sure why you encounter this behavior. Can you please tell me if you create the DNS in the Advanced Installer project or manually before installing the package?

Also, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Rajeshree
Posts: 13
Joined: Thu Sep 05, 2013 12:10 pm

Re: ODBC Connection database not found

Hi Eusebiu,

The problem was in my application itself.
Can we create the Data Source name dynamically from the dialog input box??
Thanks for the reply.

Regards,
Rajeshree B
Rajeshree
Posts: 13
Joined: Thu Sep 05, 2013 12:10 pm

Re: ODBC Connection database not found

Hi,

I wanted to create a dialog that will ask for the existing database or to create a new database.
If the user selects, existing database then a dialog with existing ODBC connection should appear.
If the user selects, create new database then steps to create new database should appear.
Probably, I think this approach can be achieved using searching the registry.
Please provide some detail steps regarding searching the registry values.

Thanks and Regards,
Rajeshree B
Rajeshree
Posts: 13
Joined: Thu Sep 05, 2013 12:10 pm

Re: ODBC Connection database not found

I have another issue. How would I read list of all ODBC entries thru Regsitry?

Is there any other approach to read list of available ODBC Datasource entries list?

Help in this regards is much appreciated.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: ODBC Connection database not found

Hi Rajeshree,
Can we create the Data Source name dynamically from the dialog input box??
I'm afraid that this cannot be achieved, the name of the DSN can only be set in the .AIP before building the package.
I wanted to create a dialog that will ask for the existing database or to create a new database.
In order to achieve this you can go in the Dialogs page, create a new dialog and add a "Radio Button Group" control that contains two radio buttons.
If the user selects, existing database then a dialog with existing ODBC connection should appear.
For this you can do the following steps:
- create a custom action which takes the existing connections from the registry (HKLM\Software\ODBC\ODBC.INI\ODBC Data Sources) and execute this custom action as a published event on the [Next] button of the dialog created at the above step
- create a new dialog which will display all the existing connections, for example in a list box
- right-click on that dialog and select the "Show only if..." option
- use the property related to the radio button group from the previous dialog as a condition (i.e. RADIOBUTTONGROUP = "Option1")
If the user selects, create new database then steps to create new database should appear
- right-click on the dialog with the radio button group, choose "Add Dialog" and add the "SQLConnectionDlg" predefined dialog
- use the "Show only if..." option for the "SQLConnectionDlg" predefined dialog and also set a condition for it (i.e. RADIOBUTTONGROUP = "Option2")
- go in the "SQL Scripts" page, add a new "Predefined Connection" and configure it similar as described in the Configure MS-SQL Server Connection article
- in the "Condition" field of the predefined connection you can set the same condition as used for the "SQLConnectionDlg" dialog (i.e. RADIOBUTTONGROUP = "Option2")
How would I read list of all ODBC entries thru Regsitry?
As I already mentioned, you can create your own custom action which takes the ODBC Datasource entries from the "HKLM\Software\ODBC\ODBC.INI\ODBC Data Sources" registry location.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Rajeshree
Posts: 13
Joined: Thu Sep 05, 2013 12:10 pm

Re: ODBC Connection database not found

Thanks a lot for the detailed steps and procedure..
It will really help me.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: ODBC Connection database not found

My pleasure.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”