[Zope-DB] Re: Zope-DB digest, Vol 1 #131 - 4 msgs

Bob Corriher bobc@p-wave.com
Fri, 22 Mar 2002 15:10:57 -0500


I have been able to use <dtml-sqlvar>for booleans  in postgreSQL withe the following
syntax:   <dtml-sqlvar name="nb" type=int>::bool. I pass 1 for true and 0 for false. I
use the POPY DA, but I think this should work with psycopg.

Bob Corriher
P-Wave Inc.


On Thu, Mar 21, 2002 at 10:34:44AM -0500, Joel Burton wrote:
> Works fine for me. I'm using PG 7.2, Zope 2.5.0, zpsycopg 1.11.
>
> What versions are you using?
>
> Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
> Knowledge Management & Technology Consultant
>
> > -----Original Message-----
> > From: zope-db-admin@zope.org [mailto:zope-db-admin@zope.org]On Behalf Of
> > Ashley
> > Sent: Wednesday, March 20, 2002 3:54 PM
> > To: zope-db@zope.org
> > Subject: [Zope-DB] sqlvar tag has no type="boolean"
> >
> >
> > Hi list,
> >
> > I'm now to zope (and sql also).  I am using postgresql with
> > psycopg.  This is
> > my first attempt to setup a Z SQL meathod to insert into my
> > table.  My table
> > has several boolean attributes:
> >
> > CREATE TABLE contacts (
> >      contact_id         integer primary key
> >     ,owner              boolean
> >     ,manager            boolean
> >     ,buyer              boolean
> > );
> >
> > I can not figure out how to get zope to insert into a boolean attribute.
> > If I use sqlvar type="string", and enter true in the insert form,
> > zope passes
> > 'true' and postgresql chokes on the single quotes.
> >
> > Surely there is a work around. Any ideas?
> >
> >
> > --
> > Ashley Gould                                        510.482.0525
> > 3020 Kansas St.                                     ashleyg@dnai.com
> > Oakland, CA 94602
> >
> > _______________________________________________
> > Zope-DB mailing list
> > Zope-DB@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-db
> >

--
Ashley Gould                                    510.482.0525
3020 Kansas St.                                 ashleyg@dnai.com
Oakland, CA 94602