Hi all,
a user recently encountered an error in one of my apps which involved the use of an apostrophe in a edit text field. I narrowed this down to being a sql error, but unsure how to fix it. This is how my sql statement looks at the moment and I hope someone can help me revise it to accept apostrophes.
Thank you
a user recently encountered an error in one of my apps which involved the use of an apostrophe in a edit text field. I narrowed this down to being a sql error, but unsure how to fix it. This is how my sql statement looks at the moment and I hope someone can help me revise it to accept apostrophes.
B4X:
Main.sql1.ExecNonQuery("UPDATE sideeffect set DrugName ='"& edtBrand.Text & _
"', SideEffect ='"& edtEffect.Text & _
"', CurPrev ='"& Main.itemChecked & _
"', Purpose ='"& edtPurpose.Text & _
"', GoodBad ='"& Main.goodbadcheck & _
"', DrugBrand ='"& edtGen.Text & _
"' WHERE ID = '" & Main.strID & "'")
Thank you