How to read the recordcount of a dataview in afteropendatapipelines?
In the afteropendatapipelines event i would like to get the count of a dataview (how many records the query returned).
I tried something like
if MyDataView.RecordCount = 0
How to perform it?
I tried something like
if MyDataView.RecordCount = 0
How to perform it?
Comments
We avoid the use of RecordCount because it requires the client to access the entire dataset and can cause the application to hang for large datasets. To access the RecordCount, you would need to directly access the TDataSet descendent. I recommend creating a summary query instead using a SELECT COUNT aggregate.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
In fact what you suggest is the technique i usually use but i wanted to expand my knowledge.
IN this case the dataset length is decided by me (an autosearch parameter where the user can choose the max number of records).
I will keep in mind your suggestion for avoiding deadlocks. A simple count dataview is for sure more preformant (= customer happier).
Best regards.