Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cannot get parameterized queries to work for ORACLE

Re: Cannot get parameterized queries to work for ORACLE

From: kroma <kroma_at_worldnet.att.net>
Date: 1998/01/02
Message-ID: <68jpsp$2s7@bgtnsc02.worldnet.att.net>#1/1

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.

Received on Fri Jan 02 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US