Okay, I'm using VB.NET and SQL. Now, the accessing and updating of the database works fine. Now I'm trying to retrieve the data. So far I have:
What would I need to do to save the return value? I tried saying:
but all I ever get is -1, even when I say:
So how do I save the value from a SELECT statement? Thanks!
Code:
sql_command.CommandText = "SELECT uid FROM userlist WHERE uname = ' " & txtUName.Text & " ' AND pword = ' " & txtPWord.Text & " '"
sql_command.ExecuteNonQuery()
Code:
Dim result As Integer (and also As String)
result = sql_command.ExecuteNonQuery()
Code:
sql_command.CommandText = "SELECT uid FROM userlist"