jwu1023
Member
Dear all,
I used OdbcCommand.ExecuteNonQuery to run a insert query and it worked. However, the return value of this command is -1, even though thousands of rows inserted into the table already.
From the dynamic help of OdbcCommand.ExecuteNonQuery:
"For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1."
I wonder how could -1 return in my case. Does that mean rollback occured?
How can I know how many rows inserted in my table?
If anyone can help? I do appreciate.
I used OdbcCommand.ExecuteNonQuery to run a insert query and it worked. However, the return value of this command is -1, even though thousands of rows inserted into the table already.
From the dynamic help of OdbcCommand.ExecuteNonQuery:
"For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1."
I wonder how could -1 return in my case. Does that mean rollback occured?
How can I know how many rows inserted in my table?
If anyone can help? I do appreciate.