SQLObject - Connect to established DB with non-int 'id' field

Pradeep Jindal praddyjindal at gmail.com
Mon Oct 29 05:25:00 EDT 2007


On Saturday 20 Oct 2007 5:43:48 am Sean DiZazzo wrote:
> Hi all,
>
> I am just beginning with TurboGears and have run into a problem with
> SQLObject.
>
> I'm trying to connect to an established mysql DB, and use TurboGears
> to display results from the DB only.  The problem is that the DB
> already has an 'id' field that is a string as opposed to an int.
> SQLObject complains because it wants to use the id field for it's own
> purposes.
>
> How can I use TurboGears to get data out of this DB?
>
> Thanks in advance.
>
> ~Sean
I know I am not exactly answering your question, but its much better to use 
sqlalchemy when you already have the databases setup. And especially when you 
can not make any changes to existing database schemas.

- Pradeep



More information about the Python-list mailing list