Subject | Re: [IBO] Problem/Bug with Descending Incremental search? |
---|---|
Author | Mark Pickersgill |
Post date | 2003-12-17T11:36:51Z |
I'm also getting the same effect with ascending incremental searches
on a dataset of 900 odd rows.
I have noticed that if I set the AutoFetchAll property to TRUE, then
the ascending searches seem to select the correct row, however, the
descending incremental searches are still inaccurate.
Has someone found a similar problem??
thanks
Mark
MP> Hello,
MP> just been playing around with basic incremental searching and
MP> have noticed that if a descending order is used with a
MP> TIB_IncSearch component with SearchKeyByKey and SeekNearest set
MP> to true, the records that the dataset seeks to are incorrect.eg
MP> you may have entered 'fr' into the Incremental search edit box,
MP> but even though there is a record "FRESH", the dataset will
MP> jump to something like "FISH".
MP> I'm wondering if I'm doing something wrong or whether it's a bug?
MP> Ascending incremental search works fine.
MP> Here are some steps to reproduce the problem:
MP> 1) Setup test table:
MP> CREATE TABLE TEST (CODE CHAR(6), DESCR VARCHAR(10));
MP> INSERT INTO TEST (CODE) VALUES('FAL');
MP> INSERT INTO TEST (CODE) VALUES('FALQ');
MP> INSERT INTO TEST (CODE) VALUES('FANG');
MP> INSERT INTO TEST (CODE) VALUES('FBM');
MP> INSERT INTO TEST (CODE) VALUES('FFFV');
MP> INSERT INTO TEST (CODE) VALUES('FIOO');
MP> INSERT INTO TEST (CODE) VALUES('FISHSJ');
MP> INSERT INTO TEST (CODE) VALUES('FITZ');
MP> INSERT INTO TEST (CODE) VALUES('FITZ.');
MP> INSERT INTO TEST (CODE) VALUES('FJOE');
MP> INSERT INTO TEST (CODE) VALUES('FRSS');
MP> INSERT INTO TEST (CODE) VALUES('FRUIBA');
MP> INSERT INTO TEST (CODE) VALUES('FRUITX');
MP> INSERT INTO TEST (CODE) VALUES('FSAP');
MP> INSERT INTO TEST (CODE) VALUES('FULL');
MP> INSERT INTO TEST (CODE) VALUES('FVOM');
MP> INSERT INTO TEST (CODE) VALUES('FWFM');
MP> COMMIT;
MP> 2) Create a new application
MP> -Drop a TIB_Connection (name it con) and hook it up to a test database
MP> -Drop a TIB_DataSource, TIB_Query (name it sql1) and hook them up (and
MP> to the connection)
MP> -Drop a TIB_Grid, TIB_IncSearch and set the Datasource property
MP> -Set the SearchKeyByKey and SeekNearest properties on the
MP> TIB_IncSearch component to TRUE.
MP> 3) Set the Query up (note, these were all setup in the component
MP> editor)
MP> -SQL:
MP> SELECT CODE, DESCR FROM TEST
MP> -OrderingItems:
MP> CODE=CODE;CODE DESC
MP> DESCR=DESCR;DESCR DESC
MP> -OrderingLinks:
MP> CODE=ITEM=1
MP> DESCR=ITEM=2
MP> -SearchingLinks
MP> CODE=CODE
MP> DESCR=DESCR
MP> 4) Place:
MP> con.Connect;
MP> sql1.Prepare;
MP> sql1.Open;
MP> into the FormCreate method.
MP> 5) Run app and click on the Grid heading until the order of the code
MP> field is decending. Then type in "fr" into the incremental search
MP> edit.
MP> You should see that the record selected is not the correct one. (In my
MP> case it was "FISHSJ")
MP> Any suggestions?
MP> Setup:
MP> Delphi 5 (update pack 1)
MP> IBObjects 4.3.Aa
MP> Firebird 1.5rc7
MP> Windows 2000 sp4
MP> thanks
MP> Mark
MP> ___________________________________________________________________________
MP> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
MP> without the need for BDE, ODBC or any other layer.
MP> ___________________________________________________________________________
MP> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
MP> keyword-searchable FAQ, community code contributions and more !
MP> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
on a dataset of 900 odd rows.
I have noticed that if I set the AutoFetchAll property to TRUE, then
the ascending searches seem to select the correct row, however, the
descending incremental searches are still inaccurate.
Has someone found a similar problem??
thanks
Mark
MP> Hello,
MP> just been playing around with basic incremental searching and
MP> have noticed that if a descending order is used with a
MP> TIB_IncSearch component with SearchKeyByKey and SeekNearest set
MP> to true, the records that the dataset seeks to are incorrect.eg
MP> you may have entered 'fr' into the Incremental search edit box,
MP> but even though there is a record "FRESH", the dataset will
MP> jump to something like "FISH".
MP> I'm wondering if I'm doing something wrong or whether it's a bug?
MP> Ascending incremental search works fine.
MP> Here are some steps to reproduce the problem:
MP> 1) Setup test table:
MP> CREATE TABLE TEST (CODE CHAR(6), DESCR VARCHAR(10));
MP> INSERT INTO TEST (CODE) VALUES('FAL');
MP> INSERT INTO TEST (CODE) VALUES('FALQ');
MP> INSERT INTO TEST (CODE) VALUES('FANG');
MP> INSERT INTO TEST (CODE) VALUES('FBM');
MP> INSERT INTO TEST (CODE) VALUES('FFFV');
MP> INSERT INTO TEST (CODE) VALUES('FIOO');
MP> INSERT INTO TEST (CODE) VALUES('FISHSJ');
MP> INSERT INTO TEST (CODE) VALUES('FITZ');
MP> INSERT INTO TEST (CODE) VALUES('FITZ.');
MP> INSERT INTO TEST (CODE) VALUES('FJOE');
MP> INSERT INTO TEST (CODE) VALUES('FRSS');
MP> INSERT INTO TEST (CODE) VALUES('FRUIBA');
MP> INSERT INTO TEST (CODE) VALUES('FRUITX');
MP> INSERT INTO TEST (CODE) VALUES('FSAP');
MP> INSERT INTO TEST (CODE) VALUES('FULL');
MP> INSERT INTO TEST (CODE) VALUES('FVOM');
MP> INSERT INTO TEST (CODE) VALUES('FWFM');
MP> COMMIT;
MP> 2) Create a new application
MP> -Drop a TIB_Connection (name it con) and hook it up to a test database
MP> -Drop a TIB_DataSource, TIB_Query (name it sql1) and hook them up (and
MP> to the connection)
MP> -Drop a TIB_Grid, TIB_IncSearch and set the Datasource property
MP> -Set the SearchKeyByKey and SeekNearest properties on the
MP> TIB_IncSearch component to TRUE.
MP> 3) Set the Query up (note, these were all setup in the component
MP> editor)
MP> -SQL:
MP> SELECT CODE, DESCR FROM TEST
MP> -OrderingItems:
MP> CODE=CODE;CODE DESC
MP> DESCR=DESCR;DESCR DESC
MP> -OrderingLinks:
MP> CODE=ITEM=1
MP> DESCR=ITEM=2
MP> -SearchingLinks
MP> CODE=CODE
MP> DESCR=DESCR
MP> 4) Place:
MP> con.Connect;
MP> sql1.Prepare;
MP> sql1.Open;
MP> into the FormCreate method.
MP> 5) Run app and click on the Grid heading until the order of the code
MP> field is decending. Then type in "fr" into the incremental search
MP> edit.
MP> You should see that the record selected is not the correct one. (In my
MP> case it was "FISHSJ")
MP> Any suggestions?
MP> Setup:
MP> Delphi 5 (update pack 1)
MP> IBObjects 4.3.Aa
MP> Firebird 1.5rc7
MP> Windows 2000 sp4
MP> thanks
MP> Mark
MP> ___________________________________________________________________________
MP> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
MP> without the need for BDE, ODBC or any other layer.
MP> ___________________________________________________________________________
MP> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
MP> keyword-searchable FAQ, community code contributions and more !
MP> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/