This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: SQL Text Replacement not Working at All
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 14, 2010
09:46 AM
SQL Text Replacement not Working at All
I am trying to get the Text Subsitutions working with SQL Scripts and nothing is working. First I tried using 'TextSubSetValue' to define a global that I set from script and used in the SQL Text Substitution. (No Luck)
Then I tried just entering static text into the "Replace With" and still no luck. I know that my search string is correct because I can paste it into the search window in the Script tab and if finds it. (Still No Luck)
Anyone else able to get this to work?
I am running IS2010 Pro under Windows 7.
Then I tried just entering static text into the "Replace With" and still no luck. I know that my search string is correct because I can paste it into the search window in the Script tab and if finds it. (Still No Luck)
Anyone else able to get this to work?
I am running IS2010 Pro under Windows 7.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 14, 2010
02:58 PM
Did you check out this thread?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2010
12:42 AM
hidenori wrote:
Did you check out this thread?
Yes, I did. I am sure am using the Angle Brackets in the substitution. I tried factoring the complexity away and just used fixed strings for replacement with no luck.
I am using InstallScript (No MSI) so this seems to be the correct way to go. (Using the String Replacement Feature)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2010
02:49 PM
Can you try a new InstallScript project with a very simple SQL script like this?
CREATE DATABASE %DBNAME%
GO
Add the following SQL Text Replacement, and see if the Hello database is created on the target server.
Find What: %DBNAME%
Replace With: Hello
CREATE DATABASE %DBNAME%
GO
Add the following SQL Text Replacement, and see if the Hello database is created on the target server.
Find What: %DBNAME%
Replace With: Hello
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 16, 2010
03:09 PM
hidenori wrote:
Can you try a new InstallScript project with a very simple SQL script like this?
CREATE DATABASE %DBNAME%
GO
Add the following SQL Text Replacement, and see if the Hello database is created on the target server.
Find What: %DBNAME%
Replace With: Hello
Thanks, for the reply and it appears to be working now. (Your sample worked also)
I time crunched at the moment but it seems that the substitutions started working when I set my SQL Scripts to execute in Batch Mode. (They were installing with the DB Component before) I don't have dependencies between my scripts so Batch Mode did not seem necessary. (Until now)
I will try some more stuff out later and try to diagnose and will update the thread with what I find.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2012
03:36 PM
Hello,
Is there a way to use a variable in installscript projects so the text substitution happen based on a custom value set a run time?
Thanks
Is there a way to use a variable in installscript projects so the text substitution happen based on a custom value set a run time?
Thanks
hidenori wrote:
Can you try a new InstallScript project with a very simple SQL script like this?
CREATE DATABASE %DBNAME%
GO
Add the following SQL Text Replacement, and see if the Hello database is created on the target server.
Find What: %DBNAME%
Replace With: Hello
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 20, 2012
04:43 PM
operaza wrote:
Hello,
Is there a way to use a variable in installscript projects so the text substitution happen based on a custom value set a run time?
Thanks
I was missing the % %, it worked by using:
1- the %variable% in the script (sql script tab)
2- in the script text replacement tab find what: %variable%
replace with:
3- Calling the function TextSubSetValue ( "