PDA

View Full Version : SQL text replacement and comments?



rmccollam
07-22-2004, 10:14 AM
Does InstallShield strip the comments from SQL scripts before performing text replacements? I have a script that needs to have some code executed when run by the installer, but can't be there for the internal automated build process that we use. I thought I could just create a couple of comments like:

--INSTALLER_LINE1
--INSTALLER_LINE2

and replace them with the actual two statements I wanted to execute. But when watching the script execute, these lines never even appear.

If what I want to do isn't possible in this way, can anyone tell me if there's a way to set the database name in InstallShield's SQL Server configuration to a variable? Our installer prompts the user for the name of the database to create during install. I tried a global substitution in the "Database Name" field, but it didn't work.

Thanks!

PilotBob
07-22-2004, 01:45 PM
Install Shield holds the database name in the IS_SQLSERVER_DATABASE property. You can create a dialog with an edit box tied to this property.

Just make sure it comes before your SQL Login screen dialog or the SQL Login dialog will create an empty database with the default database name.

BOb