Subject Re: [IBO] Using parambyname('param').asstring stop the sequence.
Author Helen Borrie
At 06:42 PM 07-09-02 +0000, you wrote:
>Hi,
> I'm using the folowing code:
>
> Var Qry_prev:TIBoQuery;
>Begin
> Qry_Prev := TIBOQuery.Create(Self);
> Qry_Prev.DatabaseName := Connection.Database;
>
> with Qry_Prev do
> begin
> Sql.Clear;
> SQL.add('Select * from mytable where C_login=:login');
> ParamByName('Login').asstring := '7';
> open;
> end;
>end;
>
> I'm debuging the code but the delphi stop in "parambyname" code
>line, and don't show any message error. Where is my error?

try this:
...
with Qry_Prev do
begin
// Sql.Clear; Not needed
SQL.add('Select * from mytable where C_login=:login');
if not Prepared then Prepare;
ParamByName('Login').asstring := '7';
open;
end;
...

Helen