Subject Re: [IBO] Error with parameters
Author Andrei Luís
Jason,

In your code you use Params[0]. How about using ParamByName?


[]s
Andrei



2011/11/7 Support List <supportlist@...>:
> This is the button click procedure I used and I get no error when the patch
> I suggested is applied:
>
> procedure TForm11.Button4Click(Sender: TObject);
> var
>  qry_tmp : TIB_Query;
> Begin
>   qry_tmp := TIB_query.Create(Self);
>   try
>     qry_tmp.SQL.Add( 'select *' );
>     qry_tmp.SQL.Add( 'from rdb$database' );
>     qry_tmp.SQL.Add( 'where rdb$relation_id = :w' );
>     qry_tmp.Params[0].asInteger := 5;
> //     qry_tmp.ParamByName('w').asInteger := 5;
>     qry_tmp.Open;
>   finally
>     qry_tmp.Free;
>   end;
>   ShowMessage('No error');
> end;
>
> Regards,
> Jason LeRoy Wharton
> www.ibobjects.com
>
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
>             without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !           Yahoo! Groups Links
>
>
>
>