Fwd: [egenix-users] Permission woes
Charlie Clark
charlie at egenix.com
Sat Apr 3 16:56:38 CEST 2004
Marc-André,
I can't answer this on my own. Is it possible to call the connection like
this from PythonScripts or is the only possible for external methods?
I've checked the documentation and it seems that you only get to work with
ZopeConnection objects which have the get_connection() method. Otherwise it
would be possible to use .execute() and .query() methods on a connection
object directly.
The only other thing I know about using SQL directly from PythonScripts is
to
import SQL from ZSQL....
Please help me understand this! ;-)
Charlie
On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote:
> My configuration:
> Windows XP
> Zope 2.7.0
> egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip
>
> I created an mxODBC Database Connection (called "crc_db") to an existing
> Access database. I created Z SQL Methods and sucessfully called them from
a
> Python script. However, I can't get .execute() to work on a connection.
Here
> is the code portion that's giving me problems:
>
> connection = container.crc_db.get_connection()
> building_rowset = connection.execute('select [Building ID] from
[Buildings]
> where [Building Name] = ?', building)[1]
>
> Whenever this code runs, a dialog box pops up in the web browser asking
the
> user to log in. The dialog doesn't accept my Zope account (user todd).
> Escaping from the dialog produces this message:
>
> Error Type: Unauthorized
> Error Value: You are not allowed to access 'execute' in this context
>
> I tried giving the script the Manager and Owner proxy roles, but this
didn't
> change the behavior. The script, the connection, and the containing
folder
> all
> belong to user todd.
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users
More information about the egenix-users
mailing list