About ExecuteNonQuery ?
-
when i use procedure CommandType is procedure and then run ExecuteNonQuery() the return value of ExecuteNonQuery() is always -1 so the return value of ExecuteNonQuery is useless when use procedure?
-
when i use procedure CommandType is procedure and then run ExecuteNonQuery() the return value of ExecuteNonQuery() is always -1 so the return value of ExecuteNonQuery is useless when use procedure?
-
when i use procedure CommandType is procedure and then run ExecuteNonQuery() the return value of ExecuteNonQuery() is always -1 so the return value of ExecuteNonQuery is useless when use procedure?
Hai 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. For more information See SqlCommand.ExecuteNonQuery Method[^]
-
when i use procedure CommandType is procedure and then run ExecuteNonQuery() the return value of ExecuteNonQuery() is always -1 so the return value of ExecuteNonQuery is useless when use procedure?
-
thanks!
-
Hai 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. For more information See SqlCommand.ExecuteNonQuery Method[^]
thanks! ^_^