Subject | RE: [IBO] Using Filter and then FindFirst method causes exception |
---|---|
Author | Anthony Tanas |
Post date | 2006-03-16T15:17:13Z |
Hi Helen,
Your code certainly works, however I am wanting to run the "FindFirst"
method. This method of course uses the filter criteria and advances the
cursor to the first row that matches.
Your code, as written, definitely works for that (setting Filtered = True),
but still causes the same exception when I try to run "FindFirst".
I also attempted to see if it would work with my original code if simply
turned on Filtered := True and it did work as well.
Finally I am using the TIBOQuery object, and not TIB_Query if that is an
issue. I did have to comment out the RefreshAction := raOpen; line as
apparently that property is not a part of TIBOQuery.
Would it be too presumptious of me to whip up a super quick and dirty demo
app with the Firebird test database to post here? Can we attach files to
these posts?
My humble thanks as allways,
Anthony
Your code certainly works, however I am wanting to run the "FindFirst"
method. This method of course uses the filter criteria and advances the
cursor to the first row that matches.
Your code, as written, definitely works for that (setting Filtered = True),
but still causes the same exception when I try to run "FindFirst".
I also attempted to see if it would work with my original code if simply
turned on Filtered := True and it did work as well.
Finally I am using the TIBOQuery object, and not TIB_Query if that is an
issue. I did have to comment out the RefreshAction := raOpen; line as
apparently that property is not a part of TIBOQuery.
Would it be too presumptious of me to whip up a super quick and dirty demo
app with the Firebird test database to post here? Can we attach files to
these posts?
My humble thanks as allways,
Anthony
>
> Filtering with the BDE is working on the Paradox table that
> the BDE writes to the user's hard disk. With non-BDE
> interfaces the filtering mechanism adjusts the WHERE clause
> of the SELECT statement and requeries the database. With the
> IBO scrolling dataset classes, you have the added benefit of
> the multiple cursor buffers, which allow the refresh to
> recycle the target rows in the buffer if they are are within
> the current range resident in the buffer.
>
> But filtering is a property of scrolling datasets, so
> referring to the Dataset property of the datasource is not
> sufficient. You must cast the dataset to a TIB_Bdataset class.
>
>
> >Thanks for any suggestions,
>
> procedure TfrmEditProcedure.edtSearchProcChange(Sender:
> TObject); begin
> with dtsrcProcedure.DataSet as TIB_Query do
> // or, with TIB_Query(dtsrcProcedure.Dataset) do
> begin
> if Filtered then
> begin
> Filtered := False;
> Filter := '';
> end;
> Filter := 'CODE = ''' + edtSearchProc.Text +'*''';
> Filtered := True;
> RefreshAction := raOpen;
> Refresh;
> end;
> end;
>
> Helen
>
>
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>