update query help

  • Thread starter Thread starter PCH
  • Start date Start date
P

PCH

I'm trying to run a sql update query from and oledb command object to an
access 97 database.

UPDATE myTable SET MyData = ""this is what's going on "here" ok."" WHERE
MyID = ""2345""

I think the problem is with the Mydata part, with the value having full and
half quotes.

Thanks.
 
I'm trying to run a sql update query from and oledb command object to an
access 97 database.

UPDATE myTable SET MyData = ""this is what's going on "here" ok."" WHERE
MyID = ""2345""

I think the problem is with the Mydata part, with the value having full and
half quotes.

Thanks.

Try delimiting the strings with just one doublequote character, and
representing embedded doublequote characters with a pair of them:

UPDATE myTable SET MyData = "this is what's going on ""here"" ok."
WHERE MyID = "2345"

The singlequote will not need any special treatment.
 
Thanks worked perfectly!

John Vinson said:
Try delimiting the strings with just one doublequote character, and
representing embedded doublequote characters with a pair of them:

UPDATE myTable SET MyData = "this is what's going on ""here"" ok."
WHERE MyID = "2345"

The singlequote will not need any special treatment.
 

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

Back
Top