Normally I use a DataReader to read values from a stored procedure but it is not working in this situation. On a stored procedure that INSERTS into a tabel I have a RETURN statement that returns the @@IDENTITY (identity value for the inserted row, primary key). When I use the code below:
I get an error that says there is nothing to read. Anybody know how to read this value?VB Code:
dr = cmd.ExecuteReader MsgBox(dr.GetValue(0))




Reply With Quote