Subject Re: [IBO] onpreparesql & odd behaviour
Author petegajria
yup
the list is created when the datamodule is created
the FQueryList is defined in the basedatamodule under the protected
section
so its there for all the inherited dm's


btw i also had an if statement that checks

if(not Assigned(FQueryList))then
Exit;

then the rest of the code

addtionally this should also work
TIBOQuery(Sender).SQLWhereItems.Assign(FQueryList)
but that also chokes



--- In IBObjects@y..., Daniel Rail <daniel@a...> wrote:
> At 26/06/2002 07:54 PM, you wrote:
> >heres the code
> >
> >procedure TDataSetDM.QueryOnPrepareSql(Sender : TObject);
> >var
> > I : Integer;
> >begin
> > for I:=0 to FQueryList.Count - 1 do
> > //TIBOQuery(Sender).SQLWhereItems.Add (FQueryList.Strings[I]);
> > showmessage((FQueryList.Strings[I]));
> >end;
> >
> >the problem is i get an av no matter what code i have in that event
> >eg showmessage(TIBOQuery(Sender).Name) will work
> >anything else that has to do with SQLWhereItems. will barf
> >
> >is there an issue with multiple tiboqueries sharing 1 event code ?
>
> Is FQueryList created prior to the event firing?
>
>
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.accramed.ca)