You could save the records from the database to a List, in this case you will save the autoincrement field, so, when the user click on the list view, you use the index of the list view to grab the autoincrement value and retrieve your record from the DB.
Thank you for help it works. But filling Listview and a seperate List takes a long time and memory for long tables with a lot of fields.
I figured that I can extract autointeger KeyValue within Itemclick Sub. Provided that Text value is unique.
Thanks
Serdar,
B4X:
Sub Listview1_ItemClick (Position As Int, Value As Object)
Dim KeyValue as Int
KeyValue=SQL1.ExecQuerySingleResult("SELECT AutoInt FROM MyTable WHERE Text='" & Value & "'")
End Sub