Variables Not Replaced In Sql Script ?
Posted: Sun Jul 16, 2006 9:58 pm
Hi All (again),
So I've got my sql scripts executing now, but the scripts that insert default data into my tables aren't working properly. Specifically, the data inserted isn't having variables replaced with their values.
For example, in some cases I insert the value $TARGETDIR$\\Installations\\1 into a table. When I check the database after install, the column contains $TARGETDIR$\\Installations\\1 instead of c:\\program files\\myapplication\\Installations\\1. There are a number of other values (machine names, IP Addresses, user entered values) that I also want to replace in various insert statements.
It's worth noting the scripts I'm running are loaded using the #FILESCRIPT# syntax. Do scripts executed this way support variable replacement ? If not, why not and how can I get around this ? The scripts are very large and I don't want to embed them in the install itself because of the problem where large scripts make the install look like it's hung.Am I doing something wrong ?
Thanks.
So I've got my sql scripts executing now, but the scripts that insert default data into my tables aren't working properly. Specifically, the data inserted isn't having variables replaced with their values.
For example, in some cases I insert the value $TARGETDIR$\\Installations\\1 into a table. When I check the database after install, the column contains $TARGETDIR$\\Installations\\1 instead of c:\\program files\\myapplication\\Installations\\1. There are a number of other values (machine names, IP Addresses, user entered values) that I also want to replace in various insert statements.
It's worth noting the scripts I'm running are loaded using the #FILESCRIPT# syntax. Do scripts executed this way support variable replacement ? If not, why not and how can I get around this ? The scripts are very large and I don't want to embed them in the install itself because of the problem where large scripts make the install look like it's hung.Am I doing something wrong ?
Thanks.