B4J Question SQLite [Resolved]

Sergey_New

Well-Known Member
Licensed User
Longtime User
If there is an apostrophe in the string, an error occurs. How to pass the string value correctly?
B4X: Copy
Dim key As String="I1"
Dim str As String="d'Ydewalle"
db.ExecNonQuery("INSERT INTO names (id, name) VALUES ('" & key & "', '" & str & "')")
 
Use db.ExecNonQuery2

(read the contextual help)

Clipboard02.jpg
 
Upvote 1
Thanks!
I've never used parameterized queries:( .
Please write the correct code.
 
Upvote 0
Back
Top