This is not about JESS but you never repeat it enough.
Whenever you include a string variable in an SQL statement you must encode the string as a string literal according to the SQL syntax. Besides surrounding the string with quotes, you must escape all quotes and special characters that might appear in the data.

Regards,
Florian.

[EMAIL PROTECTED] wrote:
Thanks, exactly what I was looking for!

On Feb 19, 2007, at 4:38 PM, [EMAIL PROTECTED] wrote:

(bind ?name "henry")
(?statement executeUpdate
"UPDATE rules SET rule1 = 'yes' WHERE name = '?name';")

Use the "str-cat" function:

(?statement executeUpdate
     (str-cat "UPDATE rules SET rule1 = 'yes' WHERE name = '" ?name
"';"))


---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------






--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------



--
Florian Fischer
Service d'Informatique Médicale
Hôpitaux Universitaires de Genève
Tél: 022 37 28861
[EMAIL PROTECTED]



--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to