Subject | Re: [IBO] When have a query it's data |
---|---|
Author | guido.klapperich@t-online.de |
Post date | 2000-12-31T02:52:41Z |
There is data. When I open the query and execute the code in the event later,
for example in a OnButtonClick-Event, all works fine.
Helen Borrie wrote:
for example in a OnButtonClick-Event, all works fine.
Helen Borrie wrote:
> Guido,
> It seems you don't have any data. First() will be at both BOF and EOF if
> the dataset is empty.
>
> Try this:
>
> At 02:48 AM 02-01-01 +0100, you wrote:
> >I have a query FMQuery and in the AfterOpen-Event I want to go through
> >the data, but no data is there. It's look like:
> >procedure TCustomersDataModule.FMQueryAfterOpen(IB_Dataset:
> >TIB_Dataset);
> >begin
>
> if FMQuery.IsEmpty then
> showmessage('Empty dataset')
> else
> begin
>
> > FMQuery.First;
> > while not FMQuery.EOF do
> > begin
> > showmessage('blabla');
> > FMQuery.Next;
> > end;
>
> end;
>
> >end;
>
> If you discover the dataset is empty, it means either there IS no data to
> match your SQL or that the Open didn't work.
>
> If the Open didn't work, look to see whether the transaction is either
> uncommitted, or not restarted; or whether perhaps the statement is not
> receiving the parameter you expect.
>
> H.
>
> All for Open and Open for All
> InterBase Developer Initiative ยท http://www.interbase2000.org
> _______________________________________________________
>