On Mar 7, 3:29 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> <code>
> from sqlalchemy import *
> metadata = BoundMetaData ("mssql://VODEV1/TimHolding")
> test = Table ("test", metadata, autoload=True)
> result = test.insert ().execute (code = "ABC")
> print result.last_inserted_ids ()
> # => [1]
> </code>
>
> which is what I expected. If I explicitly set NOCOUNT OFF
> for my session (in case it's on by default) using:
>
> metadata.engine.raw_connection ().execute ("SET NOCOUNT OFF")
>
> then it still works.
>
> Is my case the situation you're describing? Or have I
> misunderstood somthing?
My fault: I forgot to tell you that I was using a mapped class, and
it's the sqlalchemy-generated 'select @@identity' that causes the
problem. (you can see that it does that in the log output)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---