[sqlalchemy] Re: Can't insert records into a MS SQL database

2007-10-07 Thread Rick Morrison
BTW the "assume autoincrement for integer PK" behavior is a hangover from the early days of the module, where I originally copied from the PG module. Since PG doesn't have the funky "it's ok to explicit ID insert now" mode, the problem doesn't surface there. I think the behavior was meant more for

[sqlalchemy] Re: Can't insert records into a MS SQL database

2007-10-07 Thread Paul Johnston
Hi, >>Try adding autoincrement=False to the t_year column. >> >> >why would this fix the issue exactly ? > > Fair question. The explanation is a bit convoluted, not as nice and simple as the fix. MSSQL's equivalent of SERIAL/autoincrement is an "identity" flag on a column. To insert an e

[sqlalchemy] Re: Can't insert records into a MS SQL database

2007-10-06 Thread Michael Bayer
On Oct 6, 2007, at 5:20 PM, Paul Johnston wrote: > > Hi, > >> ppi = Table('ttfvbs061100', metadata, >>Column('t_year', Integer, primary_key=True), >>Column('t_dimx', String(), primary_key=True), >>Column('t_ceco', String(), primary_key=True), >>aut

[sqlalchemy] Re: Can't insert records into a MS SQL database

2007-10-06 Thread Paulino
That's it, it's working! Thank You On 6 Out, 22:20, Paul Johnston <[EMAIL PROTECTED]> wrote: > Try adding autoincrement=False to the t_year column. > > Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalch

[sqlalchemy] Re: Can't insert records into a MS SQL database

2007-10-06 Thread Paul Johnston
Hi, >ppi = Table('ttfvbs061100', metadata, >Column('t_year', Integer, primary_key=True), >Column('t_dimx', String(), primary_key=True), >Column('t_ceco', String(), primary_key=True), >autoload = True) > > Try adding autoincrement=False to the t_ye

[sqlalchemy] Re: Can't insert records into a MS SQL database

2007-10-06 Thread Paulino
>>> session.flush() 2007-10-06 21:56:08,953 INFO sqlalchemy.engine.base.Engine.0x..f0 BEGIN 2007-10-06 21:56:09,171 INFO sqlalchemy.engine.base.Engine.0x..f0 ROLLBACK Traceback (most recent call last): (...) --~--~-~--~~~---~--~~ You received this message becaus

[sqlalchemy] Re: Can't insert records into a MS SQL database

2007-10-06 Thread Michael Bayer
On Oct 6, 2007, at 1:18 PM, Paulino wrote: > > Hello! > > I'm using sqlalchemy v0.3.10 and connecting to an existing table in > MSSQL with pymssql from a windows box. > > I'm able to update existing records, but I can't insert new ones. The > error message says: "The current user is not the data