Selon Joost van der Sluis <[EMAIL PROTECTED]>:

> On Sat, 2007-05-26 at 15:00 +0200, fedorax wrote:
>
> > I've a strange bug. In this fonction ( Which was worked perfectly from few
> > months an never chage ).
> > --------------------------
> > procedure TFunc_Sql.List_TablesSelectionChange(Sender: TObject; User:
> boolean);
> > begin
> >   If List_Tables.ItemIndex<0 then List_Tables.ItemIndex:=0;
> >   T_Name:=List_Tables.Items[List_Tables.ItemIndex]; // The selected table
> name
> >   If SQLQuery.Active Then SQLQuery.Close; // Close the precedent query
> >   SQLQuery.SQL.Text:='Select * From '+ T_Name;
> >   SQLQuery.Open;  //Open to list in DbGrid
> > end;
> > --------------------------
> > The line   "If SQLQuery.Active Then SQLQuery.Close;" cause an access
> violation
> > and close the application without visible cause.
>
> My guess is that you've destroyed/freed SQLQuery somewhere before this
> code is called.
>
> Joost
>
Not that, the SQLComponent is put on the form and no instruction exist for free
it. Is it possible that a bug free a component without programmer ask to it ?

> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
>


_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to