[Zope-DB] Access database without ZSQL
Martin Gebert
Murphy@members.netsolution-net.de
Tue, 29 Oct 2002 12:32:51 +0100
Arthur Yip schrieb:
>import psycopg
>db = psycopg.connect("dbname=cvp user=webuser password=foo
>
I doubt that in Zope you're allowed to connect manually to a DB. You
should use the provided mechanisms of DA and ZSQL methods. Which means,
in short, that you define a DB connection with a DA instance and then
create your queries in ZSQL methods, which will be assigend to this
connection; this is the abstraction Charlie mentioned. Please read
chapter 12 of the Zope Book...
>Whenever I run this script, the web browser prompt the authentication dialog
>ask for username and password. Did I do something wrong?
>
>
Only that you tried to work on too low a level ;-)
Martin