Android Question Searchview

Ugochi Adenols

Member
Licensed User
Hello everyone

How can an item clicked on a searchview be directed to a database or an excel file.

Please I will need a code for it.

Best Regards
 

Mahares

Expert
Licensed User
Longtime User
How can an item clicked on a searchview be directed to a database
Here is an example for SQLite displaying the item clicked data.
B4X:
Sub SearchView1_ItemClick(Value As String)    
    Dim strQuery As String = "Select * from mytable where name =?"
    Dim rs As ResultSet
    rs=SQL1.ExecQuery2(strQuery, Array As String (Value))
    Do While rs.NextRow
        Log(rs.GetString("Address"))
        Log(rs.GetString("City"))
        Log(rs.GetString("Occupation"))
    Loop
    rs.Close
End Sub
There is a newer version represented by the cross platform B4XSearchTemplate in the XUI Views library worth checking out.
 
Upvote 0
Top