Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

SQL Commands


1 reply to this topic

paracha3

paracha3
  • Members
  • 19 posts

Posted 27 February 2002 - 01:23

Hi all,

I'm executing several SQL commands on my msi database for certain repetitive task. e.g

UPDATE Feature SET Title='paracha3' WHERE Feature='TopLevel'

and this works fine. The problem is when i want to send some french characters that have single quote character (' ) as part of text e.g

UPDATE Feature SET Title='para'cha3' WHERE Feature='TopLevel'

This fails and i have tried \' and \\' inplace of ' character but nothing seem to work. Question is how do i send something like these characters?? Can anyone help.

Thank you all.
paracha3


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 February 2002 - 10:55

From MSI Help topic "SQL Syntax":

Note that the Windows Installer SQL syntax does not support the escaping of single-quotes (ASCII value 39) in a string literal. You may instead 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 may also do this using the Database Functions MsiViewExecute, MsiRecordSetInteger, and MsiRecordSetString.