Re: SQL statement contain " character
- From: "Viatcheslav V. Vassiliev" <support@xxxxxxxxxxxxxxx>
- Date: Sat, 28 Jan 2006 19:41:21 +0300
Note that in Delphi you should double number of quotes - you double quote
once for MS SQL Server, another time - for Delphi:
sql := 'update TableName set TextField = ''Could not save with '''' in
text''';
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Dave Albiston" <mail@xxxxxxxxxxxxxxxxxx> ???????/???????? ? ????????
?????????: news:43db5cfc$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> My application stores text which often contains the " character for
> inches. I am dynamically constructing a statement like:
>
> update Tablename
> set TextField = 'Could not save with " in text',
> .
> .
> where TableID = ..
>
> The statement is accepted by SQL Server 2000 using Query Analyzer but
> fails when I execute it with a TADOQuery in D2005. The error message is:
>
> 'Parameter object is improperly defined. Inconsistent or incomplete
> information was provided.'
>
> If I remove the " character it works. It also works with the character if
> I set ParamCheck to false.
>
> Is there an explanation or is this a bug?
>
> Dave
.
- Follow-Ups:
- Re: SQL statement contain " character
- From: Dave Albiston
- Re: SQL statement contain " character
- References:
- SQL statement contain " character
- From: Dave Albiston
- SQL statement contain " character
- Prev by Date: Re: SQL statement contain " character
- Next by Date: Re: Ado inside dll ?
- Previous by thread: Re: SQL statement contain " character
- Next by thread: Re: SQL statement contain " character
- Index(es):
Relevant Pages
|