You can't just look for Properties in the Property table because technically
they can be defined at any time. Only the Properties that have non-blank
default values are in the Property table.
However, the different bracketing style is a very interesting idea. It's lots
and lots of string processing. After working out the last couple bugs in the
already (way too) extensive string processing of SQL Scripts, I'm not in a
hurry to get back in there myself. <smile/>
Can you describe your scenario a little bit more? I haven't hit a case where
all the escaping you're talking about has been necessary so I'm curious what is
different about your use case.
PS: WcaGetPropertyString() behaves as I described below, but WcaFormatRecord()
does resolve the embedded property values. Unfortunately, the second fact that
SQL uses square brackets so much, makes it not very enticing to shove the SQL
Script into a record and have it formatted for you.
From: Christopher Karper [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 06, 2008 11:41
To: Rob Mensching
Cc: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] SQL Script question
Fair enough. I know that SQL uses the square brackets itself, and I had just
stripped those out since I don't use characters that require them in my SQL
object names. I had also toyed with the idea of using a different bracket
style for my properties.
How about if I got all the records in the Property table, and iterated through
those, getting the current values, and doing the directly, instead of through
Wca or Msi.... Is that approach alright, or would I be missing something?
If I did this, I could use a different bracketing style. I know that would be
inconsistent with property usage everywhere else, but at this point, I'm just
looking to make the thing work without having to escape half my file.
I appreciate everyone's time on this. :-) This is definitely challenging and
fun, when it's not incredibly frustrating. ;-)
Chris
On Tue, May 6, 2008 at 2:34 PM, Rob Mensching <[EMAIL PROTECTED]<mailto:[EMAIL
PROTECTED]>> wrote:
Yeah. <smile/> WcaGetPropertyString, looks up the Property name passed in and
gets a value. You can't pass in "Please, resolve this [Property] for me" and
get back "Please, resolve this PropertyValue for me". You'd have to process
the SQL Script looking for [Property] strings and update them.
To further complicate matters, SQL uses square brackets to delimit names
itself. This is common [Database].[dbo].[TableName]. None of those are
property names so you'd need to do
"[\[]Database[\]].[\[]dbo[\]].[\[]TableName[\]]" to not have them get resolved.
Which is worse? <smile/>
From: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> [mailto:[EMAIL
PROTECTED]<mailto:[EMAIL PROTECTED]>] On Behalf Of Christopher Karper
Sent: Tuesday, May 06, 2008 10:42
To: wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net>
Subject: [WiX-users] SQL Script question
Why is it that SQLScripts don't use property replacement, but SQLStrings do?
It's a real hassle to break large DB deployment into dozens of smaller SQL
string elements, when the sql script action should be able to do everything I
need.
Am I missing some technical limitation that makes it difficult to run the
statements through WcaGetPropertyString before adding them to the statement
buffer?
Chris
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users