NetTalk Central

Author Topic: How can I get the total of records found  (Read 3495 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
How can I get the total of records found
« on: February 16, 2009, 10:09:16 AM »
Hallo,


I have a form with a browse and I use locator to search in the browse. How can I get the total of records found ? I use page method and the NT total will give me only the total by page ......

Thank you for any suggestions,

Regards,
Robert Iliuta

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: How can I get the total of records found
« Reply #1 on: February 17, 2009, 01:01:45 AM »
Hi Robert,

It's a pretty expensive check because typically the only way to know the number of records is for the whole result set to be read.

In a subset of cases (specifically TPS where there are no key fields in the ORDER) and (I think) SQL backends, it's possible to do a Records(View) command. Do this after the call the _SetView, and before the LOOP statement in the browse.

But be aware that this gets called with _every_ page refresh (unless you specifically code against that.)

Cheers
Bruce
 

Alberto

  • Hero Member
  • *****
  • Posts: 1872
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How can I get the total of records found
« Reply #2 on: February 17, 2009, 06:57:17 AM »
Hi Robert,
Take a look at my post in the Web Server - Share Knowlage
"Adding Total Rows and Page Number to a Paged Browse"
Hope it helps,
Alberto
-----------
Regards
Alberto