Possible Duplicate:
How to get last inserted id?
I am trying to get the last id (Last value of an identity column) to show it on control incremented by 1 each time when data is inserted to table.
How to get this last id in a stored procedure in SQL Server 2005 using C#?
Identity columns are incremented in the database, not on the C# side. You can query for the last value like this: