mohsen10024
Member
Hello.
I want to find my information from several rows, but when I limit the rows, I get an error
This code has error
Or for = 20 to 60
(CursorIndexOutOfBoundsException) android.database.CursorIndexOutOfBoundsException: Index 1 requested, with a size of 1
But for = 0 to cur.rowcount - 1 works and my rows are 1000
I want to find my information from several rows, but when I limit the rows, I get an error
This code has error
B4X:
Try
ListView1.Clear
cur=SQL1.ExecQuery("SELECT * FROM tbl1 WHERE Word LIKE'%"&EditText1.Text&"%'")
For i = 0 To 60
cur.Position=i
ListView1.AddSingleLine2(cur.GetString("Word"),cur.GetInt("ID"))
Next
cur.Close
Catch
Log(LastException)
End Try
Or for = 20 to 60
(CursorIndexOutOfBoundsException) android.database.CursorIndexOutOfBoundsException: Index 1 requested, with a size of 1
But for = 0 to cur.rowcount - 1 works and my rows are 1000