Subject Re: solved DataModule issue
From Akshat Kapoor <>
Date Thu, 20 Sep 2018 13:37:05 +0530
Newsgroups dbase.getting-started

On 19/09/2018 19:47, edward racht wrote:
> Greetings Akshat,
>> Just a word of warning if and only if the number of rows in the table
>> are greater than 10k.
>> using cangetrow to filter out just few rows will be hell of a task for
>> data engine. With SQL you can achieve the same task in a much faster way.
> Based on lessons learned and experience - I can tell.
> This is news to me.  Not in anything I have read in the books.
> So a datamodule should not be used for everything.  There is more thought required including size of table.
> Is this correct?

This is just to expand on Ken's reply.

You can access data by directly adding the tables to your form or
through datamodules.

If the same connection is used at multiple places then it is more
convenient to develop a datamodule for the connection and use it in all
the places. Just single a change in datamodule is propogated in all the
places. You need not change all the queries in the different forms.

CanGetRow is an event of rowset. How you get that rowset is irrelevant
(It can be datamodule or query in a form).  With each navigation it
checks each and every row regardless it is visible in the grid window or
not or the row pointer is on that row or not.

So if you are filtering 20 rows from a rowset of 10K rows and are
navigating also frequently you will be forced to reconsider your decision.

So if you use SQL to get a rowset of 100 rows from 10K rows and then use
canGetRow to filter just 10 rows with even more frequent navigation you
will get a much faster response.