Re: SQL statement contain " character



With ParamCheck = True, ADOExpress looks for ':' character and transforms
:Anything into parameter. It should not affect quote character.

//------------------------------------------
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:43ddcecf$1@xxxxxxxxxxxxxxxxxxxxxxxxx
>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


.



Relevant Pages

  • Re: Regex question
    ... First, if you're using character sets, there's no need to use a or in there. ... This will capture all directories until it can no longer find a trailing slash. ... It will capture any chracter that isn't a singel or double quote. ... The last would even be optional as it's already caught by the filename expression. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: how can i change the text delimiter
    ... we receive the data in csv format ... ... Defines the character used to quote fields that ... Defines the character that will be used to separate ... Extracts fields from the CSV record in string. ...
    (comp.lang.python)
  • Re: Regex question
    ... You're of course correct about the character set for the quotes. ... It will capture any chracter that isn't a singel or double quote. ... followed by a slash. ... This is your filename group. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regex question
    ... You're of course correct about the character set for the quotes. ... It will capture any chracter that isn't a singel or double quote. ... repeated between 1 and 7 times, followed by a slash. ... This is your filename group. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: quote within quote
    ... Learn to type the single quote yourself as Option +] ... character sets of those days did not HAVE the "Left single quotation mark" ... character. ... quotation; space; type single quotation (which curls properly); move ...
    (microsoft.public.mac.office.word)