0
ExecuteScalar() always Return 0
Hello My problem is that ExecuteScalar() always Return 0 even if the data in the database (im using sql server )
1 Answer
0
ExecuteScalar is not for selecting data but to get results of operations, like the average, minimum, maximum and so on.
Not scalar
SELECT age FROM user
Scalar
SELECT AVG(age) FROM user