Hi there,
You can close the reader by calling Close() on it.
However, in your situation there's a better alternative. Don't check up front if the record exists. Just perform a regular UPDATE immediately without executing a SELECT first, and then check the return value of ExecuteNonQuery to see if any records were affected.
Code:
if (cmdUpdate.ExecuteNonQuery() > 0)
{
// found
}
else
{
// not found
}
More info:
http://msdn.microsoft.com/en-us/libr...enonquery.aspx
Hope this helps,
Imar