Hi, I'm trying to design a login script using VB.net 2008 and the System.Data.SQLite wrapper. So far I have my SQLite tables setup with a default user (user: admin pass: test dob: 1990/01/01 name: John Smith) and I connect using the following code:
Imports System.Data.SQLite
Dim userName As String
Dim passWord As String
userName = usrBox.Text
passWord = passBox.Text
Dim sqlConnection As New SQLite.SQLiteConnection()
Dim sqlCommand As New SQLiteCommand
sqlConnection.ConnectionString = "Data Source=users.db3
sqlConnection.Open()
sqlCommand = sqlConnection.CreateCommand()
sqlCommand.CommandText = "SELECT * FROM users WHERE username = " & userName
However, I don't know how to check if the statement has rows for me to check if the user exists, and then I would have to do the same for passwords. Anyone know how to check if the statement has rows using a similar function? Cheers, Ben.