Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread ElevateDB OnFilterRecord Problem
Mon, Jul 9 2007 10:53 AMPermanent Link

Kishore Sharma
In the below code, the while loop goes in a infinite loop.
Below is a sample code. I am using local DB and my table have 785 records :

procedure TMyForm.ButtonClick(Sender: TObject);
begin
with EDTable do
while not EOF do
begin
  Next;
end;
showmessage('End'); //Message will never appear, as it goes in an infinite loop.
end;

procedure TMyForm.EDTable1FilterRecord(DataSet: TDataSet; var Accept: Boolean);
begin
Accept := (DataSet.FieldByName('app_ind').AsInteger and 1) > 0;  // True;
{You can use as below also.}
//Accept := (DataSet.FieldByName('app_ind').AsInteger) > 0;  // True;
end;

The table will look like this :  (App_ind can be 1,2,3...5 but not 0)
Col1  Col2 App_ind
1     ABC     1
2     NJK     2
3     VBN     3
4     YUI     1
5     VBN     3  
Mon, Jul 9 2007 5:41 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kishore,

Please don't re-post questions that you've sent via email.   Please see my
response via email - I'm still trying to reproduce the issue.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Jul 10 2007 1:09 AMPermanent Link

Kishore Sharma
Ok...Plz, let me know if you require more info..

Kishore Sharma
Image