Reputation: 21
When I run the query against the database, I get (4 row(s) affected)
.
When I run it through C#, I get -1
as the return value.
This is my code:
cmd.CommandText = "SELECT name FROM stock";
int x = cmd.ExecuteNonQuery();
Why do I get -1?
Upvotes: 0
Views: 47