Sammy wrote:

> you were trying to add a parameter that had already been
> created (by using
> :CustId in the SQL statement you had already created a
> parameter called
> CustId)
>
> Regards
>
> Sammy !!

You're right Sammy, I was trying to re-create a parameter that was
automatically created for me by TQuery.

        with SQL do begin
          Add('SELECT ... ');
          Add('FROM .....');
          Add('WHERE .....);
          Add('AND CUSTOMER_ID = :CustId');
        end;
        with Params.ParamByName('CustId') do begin
        DataType := ftString;
        ParamType := ptInput;
        AsString := '1';
      end;

This works fine. Thank you.
Sergei

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to