On Mar 20, 2009, at 8:23 PM, davidlmontgomery wrote:

> Running this I'll get "count: 1" (assuming a clean sa_test table),
> showing
> that the insert occurred.  But then looking in the database, I'll see
> that
> the data aren't there (with 0.5.2; with 0.4.8 the data will be there).
>
> The same thing happens with updates.
>
> It appears to me that the session.commit() call isn't working
> with 0.5.2.  I think the transaction is staying open until the call
> to MSSQLSession.remove(), which rolls everything back.

remove() will roll back any existing transaction but the commit() call  
previously will issue a COMMIT for any pending data.  the COMMIT will  
show up in your SQL logs so check those out.  theres no logic in the  
MSSQL engine that would specifically affect this.

however I notice that your INSERT statement is incorrect:

> command = "INSERT sa_test (data, time) VALUES ('%s', '%s')" % (data,
> time)


I'm not sure if that's an MSSQL specific syntax but its invalid in SQL  
in general (the "INTO" keyword is missing), so that might be the  
source of your issue.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to