Subject |
Re: rowset.count() |
From |
Akshat Kapoor <akshat.kapoor@kapoorsons.in> |
Date |
Mon, 9 Sep 2019 19:20:24 +0530 |
Newsgroups |
dbase.getting-started |
On 09/09/2019 18:06, Vic wrote:
> thanks , Ken !
>
> getting (-1) as a result of rowset.rowcount()
>
> So, I had to count it one by one (table in not very big) but it
> is no good anyhow
>
> Best Regards
> Victor
The only other alternative in this case would be the sql route.
I am using sql of the following sort for variable conditions.
Select * from inve19 where
(:bcde or (bcode = " " or descrip not like concat("%",bcode,"%")))
and
(:nil or (hoqty <>0 or go1qty<>0 or go2qty<>0) or (not generic))
All of the above lines joined together constitue a single SQL. I have
split it into different lines for easy reading.
If I need to follow condition 1 I set parameter :bcde to false. This
ensures that condition 1 is met
If :bcde is true then rest of the first condition will be ignored as OR
has been used.
If I need condition 2 I set :nil to false and condition 2 has to be met.
Depending upon the form checkboxes I just change the params and requery.
I have just given you a sample sql and a probable way. It can be
implemented in your case or not I cannot say but definitely worth a trial.
With processing being transferred to data engine you may observe
considerable speed difference depending upon the number of rows in
table. (It did for me with just 1500 rows in the table)
Once you use this type of query you will not be requiring canGetrow and
processing would be much faster. canGetRow slows down the scrolling
considerably. I have stopped using canGetRow once I built this query.
rowset.count() will work perfectly in this case.
Regards
Akshat
|
|