I have a SQLite database and I am tyring to query the max value in the RecordID field. This query works when I run it in SQLite but I can not get the VB to return the value, what have I done wrong?
Dim getMaxRecID As String = "SELECT MAX(RecordID) FROM String"
Using cmd1 As New SQLiteCommand(getMaxRecID, pConn)
cmd1.CommandType = CommandType.Text
Dim IDresults As Integer
Try
IDresults = cmd1.ExecuteNonQuery()
Catch ex As Exception
Throw
End Try
The connection is correctly opening the db, and shows it as open as well. No error, just IDresults returns 0 everytime.
Thanks for any help.
This solved it….