Resultset is empty (Error 40509)

The result set is empty, so an operation that requires the UpdateRow method cannot be called for a nonexistent row. Make sure the result set is not empty before calling UpdateRow.