[Zope] Python scripts - DB connection question...

Evan Simpson evan@4-am.com
Wed, 4 Jul 2001 23:31:56 -0500


From: "Lee" <lee.reilly@ntlworld.com>
> The script appears to be connecting okay (well, it doesn't result in
an error),
> but when I try and execute the SQL I am asked for my user/auth again,
which
> isn't recognised and gives the following error:
>
> result=db_conn.query(updatePersonSQL) =>
>
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
> Unauthorized

There's no permission or other security declaration on the connection's
query() method, so Zope security prevents you from calling it.  You can
edit the DB code to add security, or write an External Method that takes
a connection and returns its query method (and possibly its sql_quote
method as well, if you need it).

Cheers,

Evan @ digicool & 4-am