M
Mark Essex
I am using the SqlHelper class from the Microsoft Data Application Block and
had a question about returning an Identity Column.
Basically, I have a form with a grid bound to a DataSet. The user can, for
example, Add a new record. When they do this, and press Save, I call the
ExecuteDataSet method. I am using Stored Procedures, and in the procedure,
at the end of the insert, I do the following:
select @id = scope_identity()
@id is set as an OUTPUT parameter on the procedure.
When I check the value of the @id column on the dataset that gets returned,
the value is null.
I am just wondering if I am doing this correctly. I will continue to debug
the code, but thought I would see if anybody else has done this
successfully.
THanks,
Mark
had a question about returning an Identity Column.
Basically, I have a form with a grid bound to a DataSet. The user can, for
example, Add a new record. When they do this, and press Save, I call the
ExecuteDataSet method. I am using Stored Procedures, and in the procedure,
at the end of the insert, I do the following:
select @id = scope_identity()
@id is set as an OUTPUT parameter on the procedure.
When I check the value of the @id column on the dataset that gets returned,
the value is null.
I am just wondering if I am doing this correctly. I will continue to debug
the code, but thought I would see if anybody else has done this
successfully.
THanks,
Mark