[Zope] External Methods problem
Dmitry B. Khlonin
Dmitry B. Khlonin" <khl@paloma.spbu.ru
Sun, 30 May 1999 16:47:53 +0400
> Date: Fri, 28 May 1999 16:44:54 -0600
> From: Evelyn Mitchell <efm-zope@tummy.com>
> To: zope@zope.org
> Subject: [Zope] External Methods problem
> I'm trying to get my first External Method working.
> <!--#var "SQLTimeDiff(_['startdate'], _['starttime'], _['enddate'],
_['endtime'])" -->
> The error I'm getting is:
> <!--
> Error type: TypeError
> Error value: read-only character buffer, class
> -->
There's the problem with using data gets from SQL method in external method
using by function 'sqlattr' in my case(I also stranged by it).
f.e.
try: ob=self.sqlUserQuery(username=user_name2)
except:
wr_to_logfile(fileName,'User "%s" Not connected to database.\n' %
user_name2)
return '/Errors/error0_html'
if not ob:
wr_to_logfile(fileName,'No such user("%s"). Not logged in.\n' %
user_name2)
return '/Errors/error1_html'
ob2=ob[0]
user_name = sqlattr(ob2, 'USER_NAME')
if I tried to use user_name then this error has been occured.
> It looks to mee that the data is being passed correctly, though it doesn't
> seem to be getting to the external method SQLTimeDiff.
> Thanks in advance,
> Evelyn Mitchell
> --
> http://www.tummy.com/ Consulting and Software for Linux and Unix
> XVScan - Scanning software for Linux, HP-UX, Solaris, FreeBSD and BSD/OS
> --__--__--