Subject | Re: [IBO] How to know if a query is empty with an IB_Cursor |
---|---|
Author | aosylvain |
Post date | 2005-12-30T08:22:02Z |
Strange but, when I'm doing :
Close ;
Prepare ;
ParamByName('ID').AsInt64 := id ;
First ;
a := FieldByName('ID').IsNull ;
Then :
if the Cursor is in AutoFetchAll=true then a = false
if AutoFetchAll is set to false, a = true... with the same data...
So it does not work with AutofetchAll = true.
I dont understand...
Should I set AutoFetchAll to true or false ?
Close ;
Prepare ;
ParamByName('ID').AsInt64 := id ;
First ;
a := FieldByName('ID').IsNull ;
Then :
if the Cursor is in AutoFetchAll=true then a = false
if AutoFetchAll is set to false, a = true... with the same data...
So it does not work with AutofetchAll = true.
I dont understand...
Should I set AutoFetchAll to true or false ?
--- In IBObjects@yahoogroups.com, "aosylvain" <sylvain@a...> wrote:
>
> Ok, thank you Luc, I'll try this today.
>
> Is it really important to prepare the statement before setting the
> param ? What is the real difference ?
>
> And what is the difference with AutoFetchAll set to true or false for
> my problem ?
>
> I hope it will work but I would like to know why too ;-)
>
> Sylvain.
>
>
> --- In IBObjects@yahoogroups.com, Lucas Franzen <luc@r...> wrote:
> >
> > No, if a Cursor is Empty then EOF is True *AND* BOF is True.
> >
> > But you should prepare a statement BEFORE setting the parameter.
> > And check out if you have AutoFetchAll set to True.
> >
> > And:
> > IsEmpty *DOES* exist TIB_BDataset (IB_Query!), but NOT in TIB_Cursor
> > (since this is directly derived from TIB_Dataset).
> >
> >
> > Luc.
> >
>