What version of WiX are you using? I'm looking at the CA code for SqlScript
for both current releases (2.0.5213.0, 3.0.2813.0) and can't see where it
replaces properties in the script. The function ScaSqlStrsReadScripts in
scasqlstr.cpp (src\ca\serverca\scasched) does a lot of manipulation to
remove comments and split the script at GO commands, but doesn't appear to
either process [] or to call MsiFormatRecord.

 

You're correct that SqlString substitutes properties: it uses
WcaGetRecordFormattedString to retrieve the SQL text, which performs the
format processing (substituting properties, etc).

 

You can also use "" to delimit identifiers in SQL, as long as the
QUOTED_IDENTIFIER option is set to ON, which it is by default when using OLE
DB (which WiX uses to talk to SQL Server). However, when dumping a script
using Enterprise Manager, each stored procedure is surrounded by SET
statements indicating how the option was set when the stored procedure was
created, so you may need to remove these statements if they set
QUOTED_IDENTIFIER to OFF.

 

-- 

Mike Dimmick 

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin Burton
Sent: 06 May 2007 01:12
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] <SqlScript> and escape sequences.

 

I have a <SqlScript> task in my Wix file (.wxs) and as best as I can tell it
treats all of the [xxx] as properties so the SQL script does not run. Does
anyone have a solution on how I can run a valid SQL script with WIX? Ideally
I would like Wix to send the stream as is to the SQL engine and execute it
without trying to interpret each line and trying to substitute properties. I
can see <SqlString> substituting but when it comes to the file I don't see
the usefulness. Anyway, is there another task that I can use to escape all
of the required characters in the file before sending it to <SqlScript>?

 

Kevin

 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to