hamedaz
Member
Hi you dear friends
I've written this code. I want to get information from the database based on the following conditions. But I am faced with the following error message.
android.database.sqlite.SQLiteException: near "of": syntax error (code 1): , while compiling: SELECT * FROM idom WHERE name=Horse of a different color
I've written this code. I want to get information from the database based on the following conditions. But I am faced with the following error message.
android.database.sqlite.SQLiteException: near "of": syntax error (code 1): , while compiling: SELECT * FROM idom WHERE name=Horse of a different color
B4X:
b="Horse of a different color"
cur1=sql1.ExecQuery("SELECT * FROM idom WHERE name="&b)
For i=0 To cur1.RowCount -1
lbl.Initialize("")
'lbl.Gravity=Gravity.CENTER_HORIZONTAL
lbl.Gravity= Bit.Or(Gravity.CENTER_HORIZONTAL,Gravity.FILL)
lbl.TextSize=20
lbl.TextColor=Colors.Black
lbl.Text=cur1.GetString("text")
next