cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rguggisberg
Level 13

SQL Connection Test

Is there a DoAction event that I can use on the SQLLogin Dialog of a Basic MSI project to test connectivity to a database?
ISSQLServerValidate works fine to verify connection to the server.
But I would like to verify that I can connect to a database with the entered credentials (Database name, ODBC name, Authentication, Username, Password).
If not is there an example of a CA somewhere?
Or does one simply execute a simple query? If so, how do I do that from the SQLLogin Dialog?
Thanks.
Labels (1)
0 Kudos
(6) Replies
aspnerd
Level 2

rguggisberg wrote:
Is there a DoAction event that I can use on the SQLLogin Dialog of a Basic MSI project to test connectivity to a database?
ISSQLServerValidate works fine to verify connection to the server.
But I would like to verify that I can connect to a database with the entered credentials (Database name, ODBC name, Authentication, Username, Password).
If not is there an example of a CA somewhere?
Or does one simply execute a simple query? If so, how do I do that from the SQLLogin Dialog?
Thanks.


Did you ever figure this out? I'm trying to do the same thing but I have not found a way yet...
0 Kudos
rguggisberg
Level 13

I executed a custom action via a 'DoAction' Event where 'NameOfMyCA' is the Argument and 1 is the Condition for the Next button in the SQLLogin dialog.
0 Kudos
Superfreak3
Level 11

Were you using a Basic MSI project? I'm using InstallShield 2015 and was hoping there was a canned SQL Login dialog. Was there such a dialog in 2013 or did you create your own?

I wish to do the same with a dialog that collect Catalog/DB name, Server name, Authentication type, User name, and Password.

Any help appreciated!
0 Kudos
rguggisberg
Level 13

Superfreak3 wrote:
Were you using a Basic MSI project? I'm using InstallShield 2015 and was hoping there was a canned SQL Login dialog. Was there such a dialog in 2013 or did you create your own?

I wish to do the same with a dialog that collect Catalog/DB name, Server name, Authentication type, User name, and Password.

Any help appreciated!


I was using a Basic MSI project and added a 'DoAction' Event to the Next button of the canned SQLLogin dialog.
The "Argument" is the name of a custom action and 1 is the Condition.
Of course you need to write your own CA.
0 Kudos
Superfreak3
Level 11

Did you simply do away with the ISQLServerValidate action on the Next button and replace it with your action. I'm thinking I'll have to do the same thing. I'm currently working with the SQL Login dialog out of the box and I'm not really sure what the ISQLServerValidate actually does. I thought when I first started playing around with it, I had it failing when I changed the database name to garbage or an invalid value. Now, however, the verification seems to pass as the next dialog is displayed without error with only the Server selected. Database field was blank.

I just need to know if I can connect to the database.

Some of the errors I was getting out fo the box led me to the ISSQLDbMetaData folder. I played with that a bit by removing some commands (create db, insert records, etc), but that didn't help matters.

I couldn't get the SQL Login dialog until after adding a connection in the SQL Scripts view. I'm guessing you had the same thing with the minimum SQL requirement set on that connection.
0 Kudos
rguggisberg
Level 13

I don't think ISQLServerValidate action on Next was in there when I inherited that project.

Yes, need to add a connection in the SQL Scripts view to get the SQL Login dialog.
0 Kudos