[Zope] using database connection inside of python scripts or how to do a d-hoc queries

Tuttle, Gene cetuttle at rottlundhomes.com
Thu Feb 17 14:17:34 EST 2005


I have been searching for this answer and not finding it.

Inside a python script I want to create insert queries based on the fields
returned from a form.
I tried creating a database connection object like :

dbcon = context.Psycopg_database_connection()

Then executing a query like:
RS = dbcon.query('select * from customer').dictionaries() 

this does not work.  Can any one point me in the right direction?

Thanks
Gene



More information about the Zope mailing list