[Zope] wrong value for integer variable?
Michel Pelletier
michel@digicool.com
Wed, 28 Jul 1999 14:35:46 -0400
> -----Original Message-----
> From: Donald Holten [mailto:donner@biophysics.lanl.gov]
> Sent: Wednesday, July 28, 1999 1:58 PM
> To: zope@zope.org
> Subject: [Zope] wrong value for integer variable?
>
>
> I have the followin in my html page:
>
> <!--#call "REQUEST.set('numtemp',GetRuns())"-->
> <!dtml-call "manage_changeProperty(numtemp = numtemp + 1)">
> <!--#call "update_AccessCounter()"-->
>
> numtemp is an integer property of the html page.
> When trying to run the ZSQL Method
> update_AccessCounter(), I get an
> error saying "Invalid integer value for numtemp". Here is
> update_AccessCounter():
>
> update WRTable
> set numruns = <!--#sqlvar numtemp type=int-->
>
>
> The possible cause for this that I can see is GetRuns()
> is not returning
> an integer value. If so, how can I force it to? GetRuns
> currently is:
>
GetRuns is probably returning a string. I don't know if you can change
your SQL to return an integer, but you could also try:
<!--#call "REQUEST.set('numtemp', _.int(GetRuns()))"-->
> select numruns from WRTable
>
> And numruns is declared an integer in WRTable.
> If I am wrong, and GetRuns is sending back an integer,
> what is causing
> this error? Thanks!
> Donner
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
>