[Zope] db type conversion question

Thilo Mezger thilo@gonzo.innominate.local
10 Nov 1999 08:09:33 GMT


Sam Gendler <sgendler@teknolojix.com> wrote:
> Is there a way to get zope to automatically keep fields returned from a
> SQL query as the correct type.  Currently. my int fields are converted
> to string, which I then wind up having to convert back to int for
> comparisons, etc.  I thought I saw some mention of a type dictionary in
> the db connection string, but I couldn't find any examples.  I could
> have been mistaken, too.  Someone please illuminate me.  I am using
> MySQL by the way.

in fact, this is really something the DA (database adapter) should do.
my zpostgresqlda-0.0.3 properly converts sql-int-fields to
zope-integers.

what mysql-da are you using?  MySQLdb-0.1.0 has worked for me...

thilo


-- 
mezger@innominate.de
                                                        innominate AG
                                                    networking people
fon: +49.30.308806-11 fax: -77 web: http://innominate.de pgp: /pgp/tm