Re: SQL statement contain " character
- From: Dave Albiston <mail@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 08:37:09 +0000
I am using the QuotedStr function. The SQL statement produced is valid - it is accepted if I execute it against SQL Server in Query Analyzer.
The problem is somewhere between my code and the database. Looking through the source for ADOdb.pas it appears that it is converting the statement to a parameterised statement. This is failing when the double quote is in there but works if it is taken out. It also works if I set ParamCheck to false.
I just want to know why
Dave
Brian Bushay TeamB wrote:
The problem character is a double quote, not 2 single quotes. It is used as an abbreviation for inches. Since the application is used by engineers, it occurs fairly often.
I tried doubling the double quote and also embedding it between single quotes. Neither worked.
Use the delphi QuotedStr function.
sql := QuotedStr('update TableName set TextField = Could not save with '' in') -- Brian Bushay (TeamB) Bbushay@xxxxxxxxx
.
- Follow-Ups:
- Re: SQL statement contain " character
- From: Brian Bushay TeamB
- Re: SQL statement contain " character
- From: Kevin Davidson
- Re: SQL statement contain " character
- From: Viatcheslav V. Vassiliev
- Re: SQL statement contain " character
- References:
- SQL statement contain " character
- From: Dave Albiston
- Re: SQL statement contain " character
- From: Viatcheslav V. Vassiliev
- Re: SQL statement contain " character
- From: Dave Albiston
- Re: SQL statement contain " character
- From: Brian Bushay TeamB
- SQL statement contain " character
- Prev by Date: Re: SQL statement contain " character
- Next by Date: Re: Why all the connections?
- Previous by thread: Re: SQL statement contain " character
- Next by thread: Re: SQL statement contain " character
- Index(es):
Relevant Pages
|