default value in field

Discussion in 'ASP General' started by Lex Luthor, Jan 27, 2005.

  1. Lex Luthor

    Lex Luthor Guest

    with "select @@IDENTITY" i get the value of the last field insered.. i would
    like to get also the field.name help me plaese
    Lex Luthor, Jan 27, 2005
    #1
    1. Advertising

  2. Lex Luthor

    Steven Burn Guest

    http://aspfaq.com/show.asp?id=2174

    --

    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    "Lex Luthor" <> wrote in message news:#...
    | with "select @@IDENTITY" i get the value of the last field insered.. i would
    | like to get also the field.name help me plaese
    |
    |
    Steven Burn, Jan 27, 2005
    #2
    1. Advertising

  3. 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"
    Bob Barrows [MVP], Jan 27, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Emmanuel
    Replies:
    1
    Views:
    656
    Karl Seguin
    Nov 22, 2005
  2. Sébastien de Mapias
    Replies:
    5
    Views:
    448
    Dave Miller
    May 26, 2009
  3. Sound
    Replies:
    2
    Views:
    418
    Randy Webb
    Sep 28, 2006
  4. VUNETdotUS
    Replies:
    25
    Views:
    425
    Thomas 'PointedEars' Lahn
    Nov 10, 2007
  5. jr
    Replies:
    3
    Views:
    390
Loading...

Share This Page