-Using Sproc to insert rows in the DB and the Sproc returns identity columns to my dataset

Last post 08-20-2006 10:02 AM by tutus. 0 replies.

Sort Posts:

  • -Using Sproc to insert rows in the DB and the Sproc returns identity columns to my dataset

    08-20-2006, 10:02 AM
    • Participant
      1,904 point Participant
    • tutus
    • Member since 01-07-2006, 4:20 AM
    • Posts 585

    If we use sqdataadapter to insert data from a datatable into a table in the database using an  SPROC. The Sproc also returns the identity column values that are created by the database.

    If those identity columns are called “IDcolumn” in the physical DB but in my dataset I call them “MyIdentity”.

    So IDcolumn   is an output of my SProc

    I use :

    Pm.Direction=ParameterDirection.Output

    Then I use pm.SourceColumn property :

    Should I use « IDcolumn”  or “MyIdentity”

    Like this:

    Pm.sourcecolumn=”IDcolumn”  or like this:

    Pm.sourcecolumn=” MyIdentity”

     

    Thank you

    Thanks a lot, I appreciate your taking the time to help me.
Page 1 of 1 (1 items)