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 Scripts - Text Replacement w/Property
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
‎Feb 02, 2009
06:56 PM
SQL Scripts - Text Replacement w/Property
MSI InstallScript Project
I would like to use a property that I've set with MsiSetProperty in my Text Replacement for a SQL Script, but it never actually fills in the value.
For instance, in my scripting I have:
MsiSetProperty (ISMSI_HANDLE, "DATAMDF", strMDFPath);
And I have then used GetProperty to retrieve that value and display in a MessageBox, so I know that part is working fine.
In my SQL Script I then have a line like this:
MOVE 'Data' TO ,
And the Text Replacement entry is then:
Find:
Replace: [MASTERMDF]
What am I missing here? I'm pretty sure the property should have brackets around it because I'm using this same technique with [INSTALLDIR] and it works.
I would like to use a property that I've set with MsiSetProperty in my Text Replacement for a SQL Script, but it never actually fills in the value.
For instance, in my scripting I have:
And I have then used GetProperty to retrieve that value and display in a MessageBox, so I know that part is working fine.
In my SQL Script I then have a line like this:
And the Text Replacement entry is then:
What am I missing here? I'm pretty sure the property should have brackets around it because I'm using this same technique with [INSTALLDIR] and it works.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 02, 2009
07:23 PM
As a sanity check, how is [MASTERMDF] being set?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 03, 2009
11:06 AM
RobertDickau wrote:
As a sanity check, how is [MASTERMDF] being set?
Ooops, that was just bad copy/paste to this post on my part. 🙂 The last line is actually:
And the Text Replacement entry is then:
Find:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 03, 2009
01:06 PM
Okay, rookie mistake here... 😞
I found the problem.
I didn't exactly have:
MOVE 'Data' TO,
I actually had:
MOVE 'Data' TO N'%DATAMDF%,
and was trying to replace the %DATAMDF%, but the N' in front there caused it all to fail.
I just had to scour through a verbose log and finally found the issue.
I found the problem.
I didn't exactly have:
MOVE 'Data' TO
I actually had:
MOVE 'Data' TO N'%DATAMDF%,
and was trying to replace the %DATAMDF%, but the N' in front there caused it all to fail.
I just had to scour through a verbose log and finally found the issue.