On Jun 8, 11:27 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Hello. I am receiving the error:
sqlalchemy.exceptions.SQLError: (ProgrammingError) can't adapt 'INSERT
INTO workorderlines (workorderlines_rowid) VALUES (%
(workorderlines_rowid)s)' {'workorderlines_rowid':
Hmmm. Perhaps I oversimplified my code for the example. The
workorderlines_rowid isn't actually a primary key; given the following
code where it is not one:
from sqlalchemy import *
db = create_engine('postgres://[EMAIL PROTECTED]:5432/fleettest')
db.echo = True
metadata = BoundMetaData(db)
this syntax, from your example:
Column('workorderlines_rowid', Numeric(10,0),
default=Sequence('workorderlines_rowid_seq')),
is wrong. that is why you are getting this:
VALUES (%(company)s, %(store)s, %(barcode)s, %
(workorder)s, %(line)s, %(suffix)s, %
(workorderlines_rowid)s)' {'suffix':
Ahhh, PassiveDefault in that way worked. Excellent. Thank you.
On Jun 8, 1:43 pm, Michael Bayer [EMAIL PROTECTED] wrote:
this syntax, from your example:
Column('workorderlines_rowid', Numeric(10,0),
default=Sequence('workorderlines_rowid_seq')),
is wrong. that is why you are getting
On Jun 8, 2007, at 2:10 PM, A. Grossman wrote:
Ahhh, PassiveDefault in that way worked. Excellent. Thank you.
glad that worked.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to