ExecuteScalar() always Return 0 | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
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 )

25th Jan 2019, 7:22 PM
Maha Tazi
Maha Tazi - avatar
1 Antwort
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
25th Jan 2019, 7:45 PM
voidneo