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.
 
Back
Top