Hello,
Just playing around with ActiveRecord, IR and Sql Server and it seems
that it executes scope_identity() as a separate statement, instead of
being part of the batch file. As such, the object is never being
updated correctly.
SQL Profiler shows this:
SQL:BatchStarting INSERT INTO [users] ([name], [email])
VALUES(‘JimBob’, ‘[email protected]’) Mono local 57
2010-01-02
17:01:32.640
SQL:BatchStarting exec sp_executesql N’SELECT scope_identity()’
Mono local 57 2010-01-02 17:01:32.657
Any ideas? Anyone got this working?
Thanks
Ben