473,288 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

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

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

Oct 20 '07 #1
3 1368
Sean DiZazzo schrieb:
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?
http://sqlobject.org/FAQ.html#non-integer-ids

While I personally prefer SQLObject over SQLAlchemy, the latter has
better legacy-database-support. Maybe a switch would be the better solution.

Diez
Oct 20 '07 #2
On Oct 19, 11:51 pm, "Diez B. Roggisch" <de...@nospam.web.dewrote:
Sean DiZazzo schrieb:
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?

http://sqlobject.org/FAQ.html#non-integer-ids

While I personally prefer SQLObject over SQLAlchemy, the latter has
better legacy-database-support. Maybe a switch would be the better solution.

Diez
doh...I swear I looked there! This time I see it. Thanks.

~Sean

Oct 20 '07 #3
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
Oct 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michi Henning | last post by:
Hi, I'm using a non-blocking connect to connect to a server. Works fine -- the server gets and accepts the connection. However, once the connection is established, I cannot retrieve either the...
2
by: jacob.miles | last post by:
I'm trying to connect to a mysql database, with autoCommit and caching off, and I'm trying to create a transaction. Why does this blow up? >>> from sqlobject import * >>> connectionString =...
0
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.7.1 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as...
0
by: Guillermo Heizenreder | last post by:
Hi list I'm new whit SQLObjet. I'm study the tutorial:Connecting databases to Python with SQLObjet My problem is: Traceback (most recent call last): File "<stdin>", line 1, in <module> File...
0
by: Guillermo Heizenreder | last post by:
I'm creating one aplicattion and I use SQLObject, but I have a little problem, when I try to create one table my aplicattion crash! :( Let me show you: nercof@debian:~/Proyectos/ghhp/lib$ python...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.