Last post Apr 19, 2007 02:58 PM by Abdulkarim Kanaan
Apr 18, 2007 11:16 PM|Abdulkarim Kanaan|LINK
I would ask you about onething.
I am building project for library, I am using SqlHelper from microsoft, but my problem is:
When I want to add book as an example, I am using SqlHelper.ExecuteNotQuery() that call stored procedure in sql server 2005,
but I want to get an identitfier number that sql server generated for primary key field.
How can I use SqlHelper to get something like this.
By the way, in stored procedure after insert statment I wrote SELECT SCOPE_IDENTITY();
I am sory my english is not good.
Thank you very much
Apr 18, 2007 11:21 PM|mbanavige|LINK
change SqlHelper.ExecuteNonQuery to SqlHelper.ExecuteScalar so that the identity value will be returned.
Apr 19, 2007 02:58 PM|Abdulkarim Kanaan|LINK