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?
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?
Copyright © 2021 Jogjafile Inc.