[Zope] How to replace NULL values in a database query

Alexander Staubo alex@mop.no
Wed, 1 Sep 1999 04:52:48 +0200


Jim, are you by any chance using Brian Hooper's Sybase DA? If so, please
note that this DA handles null values poorly out of the box. I have a
simple patch that fixes this and other somewhat severe problems with
this DA.

-- 
Alexander Staubo             http://www.mop.no/~alex/
"Elvis skipped around the car and threw open the trunk.
'Hoopla!' he was heard to say, 'This is a 7.62mm M134 General
Electric Minigun. Up to 6,000 rounds per minute. 7.62mm X 51 shells.
1.36kg recoil adaptors. Six muzzle velocity of 869m/s.'
'Oh,' said Rex, 'So that's what it is.'"
--Robert Rankin, _They Came And Ate Us: Armageddon 2: The B-Movie_

> -----Original Message-----
> From: Jim Cain [mailto:jec@mgmt-inc.com]
> Sent: 31. august 1999 05:06
> To: zope@zope.org
> Subject: [Zope] How to replace NULL values in a database query
> 
> 
> All,
> 
> I have created a form which allows me to edit the contents of 
> a database
> table. To create the text fields I use something like this:
> 
> <input type=text name=blah value="<dtml-var column_name null="">">
> 
> The problem is that when the column is null, I get "None" in 
> my text field.
> The the discussion of the null="" attribute in the DTML 
> document makes it
> sound as though the special Python value None is taken care of.
> 
> This seems like a terribly elementary question. Am I missing something
> obvious?
> 
> Thanks,
> Jim
> 
> 
> 
>     ____________       Jim Cain, System Administrator     ___
>    /  ________  \         http://jec.mgmt-inc.com        /  /
>   /  / ______ \  \   _________   _______   _________  __/  /__
>  /  / /  __  \ \  \ /  _   _  \ /  ___  \ /  _   _  \/_   ___/
> /  / /  /_/  / /  //  //  //  //  /__/  //  //  //  / /  /___
> \  \ \___,_  \/  //__//__//__/ \____   //__//__//__/  \_____/, inc.
>  \  \______\____/             _____/  /
>   \_______/                   \______/  http://www.mgmt-inc.com
> 
> 
> _______________________________________________
> 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 )
>