Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    3

    Unanswered: getting ID from one table to another

    Hi.
    i am begginer . I have 2 tables
    "RECEIVING"
    Receiving_Id
    Indent_No
    Model_No
    Serial_No
    Receiving_Date
    Equipment_Detail
    Quantity_Received
    Received_By

    other is "Spare"
    SPare SerialNo
    Registration_Id
    Spare_Type_Id
    Receiving_Id
    Asset_Id
    I want to get Receiving id from Receiving table and want to save it in Spare table in Receiving_Id column .
    HOw would I do this in C# code .Im using C# and asp.net 2005 and SQL 2000.Please help me out as soon as u can . Thank u

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    yuo should call stored procedures and then use scope identity
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •