Single quotes in query
-
What is the correct way to use a a single quote in a access query. I try to load strings from one Tabel in access to another one, but some of the strings has single quotes in them. When I use a where clause or try to update with those strings in I get an error. I tried to replace the single quotes with \', like this. [string].Replace("'", "\'"); It didn't work, then i tried to replace it with the unicode value, [string].Replace("'","\u2019"); I can't think of much else I can do. Can anyone help me please. thnxs
-
What is the correct way to use a a single quote in a access query. I try to load strings from one Tabel in access to another one, but some of the strings has single quotes in them. When I use a where clause or try to update with those strings in I get an error. I tried to replace the single quotes with \', like this. [string].Replace("'", "\'"); It didn't work, then i tried to replace it with the unicode value, [string].Replace("'","\u2019"); I can't think of much else I can do. Can anyone help me please. thnxs
-
What is the correct way to use a a single quote in a access query. I try to load strings from one Tabel in access to another one, but some of the strings has single quotes in them. When I use a where clause or try to update with those strings in I get an error. I tried to replace the single quotes with \', like this. [string].Replace("'", "\'"); It didn't work, then i tried to replace it with the unicode value, [string].Replace("'","\u2019"); I can't think of much else I can do. Can anyone help me please. thnxs
doubling up on the single quote should work ie
[string].Replace("'","''");