Arthur Axel "fREW" Schmidt > DBIx-Class >
DBIx::Class::Storage::DBI::MSSQL    Annotate this POD    New  14
Open  16 Stalled  12 View/Report Bugs Source  
Latest Release: DBIx-Class-0.08270
DBIx::Class::Storage::DBI::MSSQL - Base Class for Microsoft SQL
Server support in DBIx::Class   This is the base class for
Microsoft SQL Server support, used by
DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server and
DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server.
IDENTITY information  Microsoft SQL Server supports three
methods of retrieving the IDENTITY value for inserted row:
IDENT_CURRENT, @@IDENTITY, and SCOPE_IDENTITY(). SCOPE_IDENTITY
is used here because it is the safest. However, it must be
called is the same execute statement, not just the same
connection.  So, this implementation appends a SELECT
SCOPE_IDENTITY() statement onto each INSERT to accommodate that
requirement.  SELECT @@IDENTITY can also be used by issuing:
it will only be used if SCOPE_IDENTITY() fails.  This is more
dangerous, as in