Lex Luthor wrote:
with "select @@IDENTITY" i get the value of the last field insered..
i would like to get also the field.name help me plaese
That's not possible. The rdbms does not return this information. You need to
know your database and you need to know what your code is doing. And even
then ... Say you run an INSERT statement which inserts data into a table
that contains both an IDENTITY column and a trigger. If the trigger inserts
a record into another table containing an IDENTITY column, @@IDENTITY will
contain the value for the trigger INSERT. In SQL2000, the SCOPE_IDENTITY
function solves this problem; however, it is still up to the developer to
know what table he is inserting records into and what the name of the
IDENTITY column is.
Sorry,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"