Oops, guess I was lucky that in my case, the triggers only did updates and no inserts. (I wasn't even aware of them before I ran into the problem, as I did not set up the database)
> What are the alternatives? Well, there are two: > > IDENT_CURRENT ('tablename') > > gives the last identity value assigned to this table > *in any session* (<alert>race condition</alert>) > > or > > SCOPE_IDENTITY () > > which seems to be what we're after here; it's like @@IDENTITY > but for the same "scope" (not a widely-used term in SQL > Server circles, as far as I know). The documentation > specifically gives this case as an example. > > Looks to me like this would be the best bet for sqlalchemy's > purposes, but I'm sure there's a downside somewhere ;) > > Comments? > TJG SCOPE_IDENTITY() seems the right choice. I don't know if there are hidden problems, but if there are, it looks like @@IDENTITY will have them too. So it seems safer than @@IDENTITY in any case. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---