Yeah, I had feared the properties would be like that. There doesn't seem to
be a "get me all the current properties" type of method. There probably is
a way, I'm just not that smart. ;-)
We maintain our database deployments and upgrades in a .sql file. It
generally starts life as the output from SQL Enterprise Manager "script this
DB", then we just keep in sync with our current version. That seems to
bracket every identifier, for safety.
We keep our DB creation, db user creation, and role assignments in those
scripts, and would like them to be customizable during installation.
Specifically, the database name needs to be customized, and all the "USE
[DBNAME]" statements depend on that.
I'm just trying to avoid putting SQL actions directly in the installer, if I
can just point to a script instead, which anyone on my team knows how to
manage.
Chris
On Tue, May 6, 2008 at 3:02 PM, Rob Mensching <[EMAIL PROTECTED]>
wrote:
> 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]>
> 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] *On Behalf Of *Christopher Karper
> *Sent:* Tuesday, May 06, 2008 10:42
> *To:* 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