PDA

View Full Version : How to modify SQL Script



rossellag
12-04-2012, 09:01 AM
Hello,

I need to understand how modify sql script during my istallation.

My problem is the following: during the installation I must create and populate a database. I can do it by sql scripts but for the first one I need to change a variable using the network name of the computer where the installation is done. How can I do this?

Thank you in advance for your reply.

Barbara
12-11-2012, 09:44 AM
I use the Text Replacement in the SQL Script View: In the SQL Skript I have some predefined strings which are replaced with the actual values during the installation (e.G. DATABASENAME as given by the user, COMPUTERNAME, SERVERNAME and so on.)

Barbara

rossellag
12-12-2012, 08:06 AM
Thank you very much for your reply.

I solved my problem using an InstallScript custom action and running the scrip by cmd.
In this way I could use .Net dll for the calculation of the parameters (eg: local network account) that I needed.