Gossamer Forum
Home : General : Databases and SQL :

BUG with char '

Quote Reply
BUG with char '
Hi im a new programer in html, asp and acces, im presently in stage, i just sign up with this web site today and hope i will enjoy to work out with you guys

i' m not sure im at the right place to post this but i have a little bug

Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''we're'

and the error is at this line

bd.Execute(strSQLRequete)

i know its because SQL dont like the ' and i ahve to work out something .

I been told to check with replace

anyone got any idea



tnx Crazy
Quote Reply
Re: [Yann] BUG with char ' In reply to
The complete SQL statement would help us to provide suggestions about how to fix the problem/error you've confronted.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] BUG with char ' In reply to
i found the eror it was because SQL dont like the char '

and i had to use this

Replace(TheString, "'", "''")

tnx for he reply
Quote Reply
Re: [Yann] BUG with char ' In reply to
You may want to look for a quote function, as there may well be other characters that need escaping.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Yann] BUG with char ' In reply to
Maybe you can do something like:

string.replace("'", "\\'");