<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Greetings all,</DIV>
<DIV> </DIV>
<DIV>I come to you with the hope the problem I have is easily fixed.</DIV>
<DIV> </DIV>
<DIV>Anyway, our server owner decided it was time to install the latest Debian hot fixes. Unknown to him (and undocumented by the hot fix), it proceeded to update Zope from 2.2 to 2.5.2 and Postgres from 6.5 to 7.2. Due to voluntary nature of our developers and the existence of legacy stuff in our website, we needed to keep these older versions running while a new website was built replacing our legacy stuff.</DIV>
<DIV> </DIV>
<DIV>Luckily, the upgrade hasn't caused as much trouble as we thought it would. In fact, Zope and Postgres seem to have coped quite well with it (thanking the big guy upstairs for that one). We've just run into one problem.</DIV>
<DIV> </DIV>
<DIV>The current website uses a lot of <dtml-call "REQUEST.set...> calls to push database field values to the top of the memory pile. In the previous version, if a returned value from the database was an integer, the variable assigned that value in the REQUEST.set would also assume an integer datatype.</DIV>
<DIV> </DIV>
<DIV>So, if "SELECT count(*) as total from table_1" was a Z SQL Method called in a DTML document and there was a <dtml-call "REQUEST.set('table_1_total',total)"> in the DTML document, then table_1_total would assume the datatype of integer.</DIV>
<DIV> </DIV>
<DIV>The problem we have now is that in the above example, table_1_total is assuming the datatype of string, so in fact, table_1_total = '0' not table_1_total = 0.</DIV>
<DIV> </DIV>
<DIV>This causes us problems all through the site, as any statement such as:</DIV>
<DIV> </DIV>
<DIV><dtml-if expr="table_1_total > 0" will always be true, because '0' > 0.</DIV>
<DIV> </DIV>
<DIV>Now, is there a way to fix this or is it a design feature of the later versions of Zope/Python that requires a tightening of code?</DIV>
<DIV> </DIV>
<DIV>Just wish we had the time to take the machine down and give it the new hardware it needs so as we could have taken a rollback checkpoint prior to the upgrade.</DIV>
<DIV> </DIV>
<DIV>Any help greatly appreciated.</DIV>
<DIV> </DIV>
<DIV>Wade Pearce</DIV>
<DIV> </DIV></BODY></HTML>