I've been experimenting with what I can do with a database, but I'm unfamiliar with aspects like storing a query result in a variable. I've used this snippet to query my database with more than one record, but the result I keep getting is zero. Can someone explain how this works? Here's my snippet...
str = "SELECT COUNT(Nickname) FROM Backup"
cmd.CommandText = str
cmd.Connection = myConn
myConn.Open()
cntPlns = cmd.ExecuteNonQuery()
MessageBox.Show(cntPlns.ToString)
The connection is there, but my result always comes out zero...thanks for any suggestions.