[Zope-DB] How to import SQL in python script?

eijgnit@netscape.net eijgnit@netscape.net
Mon, 10 Feb 2003 00:05:45 -0500


Hi, I would like to use python to dynamically query a database. I refer to the book, "Zope Bible" by Michael R. Bernstein, SCott Robertson, and the Codeit Development Team on page 353, it says the simplest way to import the SQL Method class is with:
    from Products.ZSQLMethods.SQL import SQL

However, when I do that, Zope will prompt me to login (and no account I used could work), and once I click on cancel, I got this error:
Error Type: Unauthorized
Error Value: You are not allowed to access SQL in this context

How do I set the permissions such that I could import the SQL object? I don't have access to the LINUX system to modify the SQL.py file.

Regards,
Tj      

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/