Hi,
To my understanding when I use cmd.ExecuteNonQuery(); (for Insert, Update, and Delete ) I get the number of records affectedvia this code>>>>
int RecAffected = cmd.ExecuteNonQuery();.....
what about if I want to get the numbers of rows from cmd.ExecuteReader() where I call a stored procedure and the store procedure (SP) get me the row affected.. here is the sp code
code from my sp>>>>>
select PersonID, fName,lName, dob, Sal,country, Active ,Photo
from Person where country = @Country
RETURN @@ROWCOUNT
but I get the following error Object reference not set to an instance of an object.
so when I call this method, I want to get results and return value . this is my code >>>>
protected void Person_SELECT_RecAccount()
{ // with explicit parameter wehre I can determine para direction
// return values is @@rowAffected
// output para is iden ...
Go to the complete details ...