Android Question Spinner item click

RobRock92

Member
Licensed User
Longtime User
B4X:
Sub Spinner1_ItemClick (Position As Int, Value As Object)
Dim m As Map
    m = dbutils.ExecuteMap(Main.SQL, "SELECT * FROM azienda WHERE id = ?", _
        Array As String(Value))
    If m.IsInitialized = False Then 'Null will return if there is no match
        ragioedit.Text = ""
        Else
        ragioedit.Text = m.Get("ragione")
        indiedit.Text = m.Get("indirizzo")
    proedit.Text = m.Get("provincia")
    capedit.Text = m.Get("cap")
    teledit.Text = m.Get("telefono")
    ivaedit.Text = m.Get("iva")
    locedit.Text = m.Get("localita")
    End If
end sub

with this code in the log says no records found but I tried to read the database with sqlite viewer B4a and records do exist!!!
 

klaus

Expert
Licensed User
Longtime User
In debug mode you can:
- set a breakpoint in the routine, and check the content of Value either in the window at bottom or hovering with the mouse over the variable name.
- add this line Log(Value) and you'll see the the result in the Log tab.
 
Upvote 0

RobRock92

Member
Licensed User
Longtime User
In debug mode you can:
- set a breakpoint in the routine, and check the content of Value either in the window at bottom or hovering with the mouse over the variable name.
- add this line Log(Value) and you'll see the the result in the Log tab.
Now klaus i see the element that i clicked in the spinner on the log..and now?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…