Both Solution 1 and Solution 2 provide you with links that lead you to some example code that will work for you.
As an exaplanation why your code is not working - this:
cmd10.ExecuteNonQuery();
doesn't return anything but the number of rows affected by the query, hence "Execute
NonQuery". It's usually used for Update- and Delete-Statements. To query something where you expect a query result (a Select-Query) you have to use ExecuteReader(..), as you can see in the linked examples of Solution 1 and 2.