[Fwd: RE: [Zope] conflict error]
Paul Zwarts
paz@oratrix.com
Mon, 5 Nov 2001 12:38:24 +0100
Prabu,
Your problem is not solvable unless we see the error. Restart your zope
server with the -D option for debug (displays the traceback in the html,
or you can just view the source when you get the error and the TB is at
the bottom). Then when the error occurs, you can copy a paste the
traceback information. Otherwise, use the try, except routne with a
<dtml-var error_tb> to show it.
Regards,
Paul Zwarts
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Adam
Warner
Sent: Monday, November 05, 2001 12:31 PM
To: zope@zope.org
Cc: prabu
Subject: [Fwd: RE: [Zope] conflict error]
Sorry Prabu I do not know the answer. I've forwarded your message to the
list. You should still supply the error message details.
Regards,
Adam
-----Forwarded Message-----
From: prabu <ajprabu@yahoo.com>
To: Adam Warner <lists@consulting.net.nz>
Subject: RE: [Zope] conflict error
Date: 05 Nov 2001 15:58:12 -0800
Tx Adam,
I ve used a python function replaceQuote(objectname) as a python script
in
zope.
The content of the replaceQuote function is
ResString=''
UnfString=strParam
if not UnfString:
return(ResString)
UnfString_Len=len(UnfString)
UnfString_Cnt=0
while UnfString_Cnt < UnfString_Len:
Unf_Char=UnfString[UnfString_Cnt:UnfString_Cnt+1]
UnfString_Cnt=UnfString_Cnt+1
if Unf_Char=='\'':
ResString=ResString+'\\'+Unf_Char
elif Unf_Char=='\\':
ResString=ResString+'\\'+Unf_Char
elif Unf_Char=='\"':
ResString=ResString+'\\'+Unf_Char
else:
ResString=ResString+Unf_Char
return(ResString)
This function will replace the single quote('), double quote(") and
slash(\)
to a set of character which is prefixed with slash(\).
I m calling this function as below whenver the objectname is accessed by
a
ZSQL method. (Becoz ZSQL method raises a zope error if the object name
is
inserted with special characters(',",\).)
<dtml-let Py_Product1="replaceQuote(Product1)">
<dtml-call "Insert_CSTable(Py_Product1)">
</dtml-let>
The problem is - I m calling this replaceQuote function often throughout
the
page. Sometimes if more number of users are accessing the same page the
Conflict Error occur. Can I solve this problem anyway.
Prabu
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )