There are 10 rows in primary_student_table.
primary_student_table
When I execute the following code, the result was -1.
Dim count As Int16 con.Open() query =
The solution is to replace
count = cmd.ExecuteNonQuery
with
count = cmd.ExecuteScalar
Like Robert Beaubien said in his comments