From the MSI SDK "SQL Syntax": The Windows Installer* SQL syntax does not support the escaping of single-quotes (ASCII value 39) in a string literal*. However, you can fetch or create the record, set the field with the *StringData* or *IntegerData*property, and then call the *Modify* method. Alternatively, you can create a record and use the parameter markers (?) described in *Execute* method. You can also do this using the database functions *MsiViewExecute*, *MsiRecordSetInteger*, and * MsiRecordSetString*.
On Tue, Jun 8, 2010 at 12:43 PM, Uma Harano <uhar...@esri.com> wrote: > Hi, > > I am trying to execute the following SQL statement on my msi database: > > cscript WiRunSQL.vbs > MySetup.msi<file:///\\emus\emus2\SetupTools\MsiTools\WiRunSQL.vbs%20MySetup.msi> > "UPDATE `ActionText` SET `ActionText`.`Description` ='Configuration de > [ProductName]... L'opération peut prendre plusieurs minutes.' WHERE > `ActionText`.`Description`= 'Configuring [ProductName]...This may take > several minutes.'" > > Note the L'opération text - this has the single quote, so I escaped it with > two single quotes (Which is a common SQL syntax for literal single quotes). > SO the new statement looks like this: > > cscript WiRunSQL.vbs > MySetup.msi<file:///\\emus\emus2\SetupTools\MsiTools\WiRunSQL.vbs%20MySetup.msi> > "UPDATE `ActionText` SET `ActionText`.`Description` ='Configuration de > [ProductName]... L''opération peut prendre plusieurs minutes.' WHERE > `ActionText`.`Description`= 'Configuring [ProductName]...This may take > several minutes.'" > > This SQL statement also fails with a SQL syntax error. (I get rid of the > two single quotes in L''opération , it works with no errors. Column is > edited correctly) > > Any ideas how I can use a literal single quote in a SQL Statement for an > MSI database? > > Thanks! > Uma Harano > > > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- virtually, Rob Mensching - http://RobMensching.com LLC ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users