basic - how to insert singlq quote via sql

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 & "')
 
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 & "')

I got this one now. Sorry for the inconvenience.

Jesper
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top