I am using SQL Server 2005 and c#. I want to get primary key value when I insert record into database.
For this I have a C# method in which I insert and update records. I am using ExecuteScalar
method for inserting and updating.
Insert record is successful but when I edit record then no update is successful.
So tell me can I use ExecuteScalar
method for update and insert record and HOW