hi all,
may i know is there any way to do like
DATASET dsdata:REcord-count. something like this instead of
for each tttemp:
i = i + 1.
end.
messsage "record count: " i
Thank you.
Regards,
TaNMH
The DATASET has no attribute that returns the number of rows.
When you are on GUI for .NET and have a proBindingSource connected to the dataset, you may use the Count property of the proBindingSource. That returns the number of rows in the top-level-buffer.
A generic approach would be to use a preselect query. That's usually faster than the FOR EACH loop. You might use the datasets TOP-NAV-QUERY for this purpose:
DATASET dsCustomer:TOP-NAV-QUERY:QUERY-PREPARE
(SUBSTITUTE ("PRESELECT EACH &1", DATASET dsCustomer:GET-TOP-BUFFER(1):NAME)) .
DATASET dsCustomer:TOP-NAV-QUERY:QUERY-OPEN () .
MESSAGE DATASET dsCustomer:TOP-NAV-QUERY:NUM-RESULTS
VIEW-AS ALERT-BOX.
Mike is correct. You can use the preselect option if not bound to a ProBindingSource.
Maura Regan
thanks for your reply