Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Cannot get parameterized queries to work for ORACLE
Andrej Gabara wrote in message <34AD06F5.BF4E213D_at_stud.uni-sb.de>...
>Hi,
>
>I'm using Delphi 2 C/S and Oracle 7.3. I'm trying to do the following:
>
> Query.SQL.Add('SELECT * FROM Foo');
> Query.SQL.Add(' WHERE FooId = :ID');
> Query.Prepare;
>
> Query.ParamByName('ID').AsString := 'Duh';
> Query.Open;
>
<snip>
>Why does the Oracle SQL Links driver not support such a very basic
>capability? Is this a bug?
>
Because your doing it wrong. The string must be in quotes. Try Query.ParamByName('ID').AsString := '''Duh''';
Thats three single quotes on each side.
![]() |
![]() |