Android Question Select from Spinner and Query

sigster

Active Member
Licensed User
Longtime User
Hi

I am try to Query when I try to use Spinner I get nothing

B4X:
Cursor1 = SQL1.ExecQuery("SELECT * FROM colorkode WHERE name = '" & Spinner_select.SelectedItem & "' AND number BETWEEN " & Txt_from.Text & " AND " & Txt_to.Text & "")
 

derez

Expert
Licensed User
Longtime User
B4X:
Cursor1 = SQL1.ExecQuery2("SELECT * FROM colorkode WHERE name = ? AND number BETWEEN ? AND ?" array as string( Spinner_select.SelectedItem ,  Txt_from.Text, Txt_to.Text ))
 
Upvote 0
Top