Subject | Re: Using parambyname('param').asstring stop the sequence. |
---|---|
Author | davissammybr |
Post date | 2002-09-08T11:26:20Z |
No works yet, its stop before enter on "if not Prepared then
Prepare;" line.
I don't understand it. In another project its works.
Prepare;" line.
I don't understand it. In another project its works.
--- In IBObjects@y..., Helen Borrie <helebor@t...> wrote:
> 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