Hello Raj,
From my understanding you are using our predefined SQLServerConnectionDlg.Since you wish to test the credentials before executing the script there is no need for another dialog.You can do this from your current dialog, there is no need of a new dialog.
Simply go to the SQLServerConnectionDlg and the Next button --> Published Events and click New.
Depending on your SQL Server type you will have to set the following event:
Set Installer property
Property:SqlConnectionString
Argument:Driver=[\{]SQL Server[\}];Server=[SERVER_PROP]; PORT=[PORT_PROP];Uid=[USERNAME_PROP];Pwd=[PASSWORD_PROP];
Condition:1
What differs on this event from one SQL Server to another is the "Driver" and the fact that Prostgres SQL servers have another field called [DATABASE_PROP].
Please have a look at the following article for more details
How to test SQL connection parameters. A very important note when using
ODBC drivers to test the connection is that Advanced Installer can only support 32 bit ones.
Now you need to test the actual connection using another event.
In the Published Events of the Next button, you will have to add the following event as well:
Execute Custom Action
Argument:TestODBCConnection
Condition:1
The order of these events should be as depicted in the screenshot.
- PublishedEventsOrder.PNG (34.06 KiB) Viewed 3809 times
I have also attached a sample project made using these exact steps. Please note that it was made for a MS SQL Server.
Best regards,
Dan