none
How can I refresh the row I just saved RRS feed

  • Question

  •  

    Hi

     

    I am using C# with ADO .NET on SQL server, after running DataAdapter.Update on a table that has a new row which the tables primary key is automatically generated the row is not refreshed.

    How can I get the value that was generated for the primary key of the row I just inserted?

     

    Thank you

    Itamar

    Saturday, February 16, 2008 5:42 PM

Answers

  • In you update command, you can use the "SELECT @@IDENTITY" query to get the newly genereted id. while you have got the id, you can also the id to reflesh the UI.

    • Marked as answer by Itamar Epstein Sunday, November 21, 2010 3:06 PM
    Friday, February 22, 2008 8:46 AM