[Zope-DB] escaping punctuation in formulator

Marie Robichon robichon at esrf.fr
Tue Feb 3 10:26:22 EST 2004


How do I escape single quotes and '(' or ')' characters passed from my 
Formulator form to my SQLmethod ??
If I don't escape them explicitly, formulator adds two single quotes around 
my value and I get a 'quoted string incorrectly terminated error' (or 
something like that).

It is particularly tricky since I have a '<dtml-in><dtml-var 
sequence-item>;</dtml-in>' construct within my sql method in order to 
extract values from mutlicheckboxes and feed them into one column in my 
oracle db.

Another problem I have: why all of a sudden does my 
oracle_database_connection close and not want to open due to a 
dco2.DatabaseError (12154, 'ORA-12154: TNS:could not resolve service name') 
- could this have something to do with the fact that we have been having 
memory leaks and have restarted our server about six times today???

Thanks in advance


More information about the Zope-DB mailing list