jusher
Posts: 174
Joined: Thu Dec 22, 2011 12:00 pm

SQL Scripts

I have made a custom connection and installed lots of scripts that add stored procedures to my database. This works ok with server credentials held in properties supplied by user dialogs.
I want this to be a feature so called it SQLINSTALLATION. I thought I would be able to use this to prevent the installer from loading the scripts which I can at the script level. The trouble is that it still tries to do the connection and fails becaus ethe credentials are not supplied if the feature is deselected through the dialogs. How can I add a condition to the connection to say "if SQL feature is nit required do not try and connect to database' I sthis possible?

Regards,
John
jusher
Posts: 174
Joined: Thu Dec 22, 2011 12:00 pm

Re: SQL Scripts

Mihail said in a previous post: -
Hi John,



"This feature would not contain anything but I am assuming I could set a property that I could check for a value when it attempts to install the SQL Scripts?

You could add a condition to each of your SQL scripts. This condition can consist of a public property which is associated with a UI control( e.g. CheckBox ). This way the scripts will be executed only if the condition is true( e.g. CheckBox is enabled by the user ).
If none of the SQL scripts assigned to an SQL connection is to be executed due to their condition or scheduling, that SQL connection will not be triggered."

Given the last line teh connection should not be triggered so I will have to check that all of teh conditions are correct before proceeding.

Regards,
John

Return to “Building Installers”