SyntaxFix
Write A Post
Hire A Developer
Questions
The ExecuteNonQuery method is used for SQL statements that are not queries, such as INSERT, UPDATE, ... You want to use ExecuteScalar or ExecuteReader if you expect your statement to return results (i.e. a query).
ExecuteNonQuery
INSERT
UPDATE
ExecuteScalar
ExecuteReader