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

Square Brackets


4 replies to this topic

tbrinkm

tbrinkm
  • Members
  • 10 posts

Posted 18 September 2001 - 21:25

I need to pass a SQL statement containing '[Group]' into an EXE I am calling in a CA.  How do I keep '[Group]'  from being replaced with an empty string?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 September 2001 - 10:13

[\[]Group[\]]]

tbrinkm

tbrinkm
  • Members
  • 10 posts

Posted 19 September 2001 - 15:24

Here's the string in question (It's the target field of a CA).

[INSTALLDIR]Utilities\psql.exe -S "[TRS_DB_SERVER_NAME]" -U "[TRS_DB_ADMIN_NAME]" -P "[TRS_DB_ADMIN_PASSWORD]" -d "dbName" -Q "INSERT tblConfig ([\[]Group[\]], [\[]Key[\]]) VALUES ('Val1','Val2');"

This is what I see in the error dialog when I don't tell it to ignore CA return values:

Internal Error 2744.  TRSDatabseFull, C:\Program Files\Standard Register\TRS\Utilities\psql.exe,
C:\ProgramFiles\Standard Register\TRS\ ...\psql.exe -S "THEO" -U "sa" -P "" -d "dbName" -Q "INSERT tblConfig (, ) VALUES ('Val1', 'Val2');"

The [\[]Group[\]] is being broken down iteratively into [] (empty), [\] (empty), and [\Group] (empty).

Ok, I don't know why, but the second ] is disappearing in all of the [\]]s.

(Edited by tbrinkm at 10:27 am on Sep. 19, 2001)


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 September 2001 - 16:31

This may be a recursion issue. The first time the [\]]] is replaced with ] . If you use this in another filed where aFormetted data are accepted, the ] will be interpreted as delimiter for a property. Maybe you can avoid the extra step 8at least for testing)? Or create a more complex expression like this:
[\[]\[\[]]Group[\[]]\[\]]]

(The second ] is eaten by the forum software, therefore I've added an additional one)