Re: SQL statement contain " character
- From: "Bill Hannan" <wfha@xxxxxxxxxxxxx>
- Date: Sat, 28 Jan 2006 13:37:58 -0500
If you are creating the sql dynamically why use parameters? I create sql
queries dynamically all the time, when I do that I avoid parameters. I
create the string with the value that would have been in the parameter as
part of the string.
Var
sqlST : string;
begin
sqlST := 'update Tablename set';
sqlST := sqlST + 'TextField = ' + edit.text; //or whatever var has the
value
..
..
sqlST := sqlST + 'where TableID = ..'
sqlObject.sql.Text := sqlST ;
With static queries parameters work well, if I'm creating the SQL dynamicly
I usually forget about parameters.
Bill
"Dave Albiston" <mail@xxxxxxxxxxxxxxxxxx> wrote in message
news:43dbae02$1@xxxxxxxxxxxxxxxxxxxxxxxxx
>I am constructing the SQL dynamically so I can't set parameter type.
>Looking at the source, it looks like the ADO component creates a
>parameterised statement on the fly. I suspect a bug in there because in
>some other statements the " character is acceptable.
>
> Dave
>
> Bill Hannan wrote:
>> It works for me delphi 7 and Sql 2000
>>
>> Parameter datatype ftString.
>>
>> I'd check your parameter data type.
>>
>> Bill
>
.
- References:
- SQL statement contain " character
- From: Dave Albiston
- Re: SQL statement contain " character
- From: Bill Hannan
- Re: SQL statement contain " character
- From: Dave Albiston
- SQL statement contain " character
- Prev by Date: Re: SQL statement contain " character
- Next by Date: Re: SQL statement contain " character
- Previous by thread: Re: SQL statement contain " character
- Next by thread: Re: SQL statement contain " character
- Index(es):
Relevant Pages
|