basic - how to insert singlq quote via sql

  • Thread starter Thread starter Jesper F
  • Start date Start date
J

Jesper F

This one fails because there's a single quote in the string - how do I
insert a single quote via sql?

Dim s as string
s = "Peter's house"
currentdb.execute "INSERT INTO tbl (fieldname) VALUES ('" & s & "')
 
This one fails because there's a single quote in the string - how do I
insert a single quote via sql?

Dim s as string
s = "Peter's house"
currentdb.execute "INSERT INTO tbl (fieldname) VALUES ('" & s & "')

I got this one now. Sorry for the inconvenience.

Jesper
 
Back
Top