From SearchView:
Will someone please tell me why this query would only fail on rowID 48?
I have re-created the db with SQLite, copied the values from the Searchview list into Col3, renamed the project, and even used a different image on row# 48.
The query finds the ID number of the image name typed into SearchView.et. Of the 101 images in the db table only #48 fails, now with 'Java.Lang.InvocationTargetException' error.
Have gotten the Exception.. IndexOutOfBounds also, and only on rowID #48.
banging head, thanks in advance.
B4X:
Public Sub lv_ItemClick (Position As Int, Value As Object)
etCLas.Text = Value
etCLas.SelectionStart = etCLas.Text.Length
ime.HideKeyboard
lv.Visible = True
If SubExists(mCallback, mEventName & "_ItemClick") Then
CallSub2(mCallback, mEventName & "_ItemClick", Value)
End If
Starter.curSpA = Starter.SQL1.ExecQuery2("SELECT id FROM tableName WHERE Col3 = ?", Array As String(etCLas.Text))
' Cursor will hold ALL values and row which are fetched with this query
' Here only one result is expected....
' set the cursor position
If Starter.curSpA.RowCount = 1 Then ' WAS a 1
' set the cursor position
Starter.curSpA.Position = 0
Main.nMm = $"${Starter.curSpA.GetInt("id")}"$
Log("whatz the SearchView ID " & $"${Starter.curSpA.GetInt("id")}"$) ' **********
Else
Log("etCLas.BBBBB " & $"${etCLas.Text}"$)
End If
Log(" ")
Log("WHAT IS pgnm " & pgnm)
CallSub(Main, "nme")
etCLas.Text=""
CallSub(Main, "clrPanlSrch")
End Sub
I have re-created the db with SQLite, copied the values from the Searchview list into Col3, renamed the project, and even used a different image on row# 48.
The query finds the ID number of the image name typed into SearchView.et. Of the 101 images in the db table only #48 fails, now with 'Java.Lang.InvocationTargetException' error.
Have gotten the Exception.. IndexOutOfBounds also, and only on rowID #48.
banging head, thanks in advance.