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
FOLLOW US
Get the latest news in Application Packaging