Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Jefferson Aguilar
  Where is Jefferson Aguilar?
 Cabanatuan
 Philippines
 Jefferson Aguilar
 Tags
Subject: RE: RECCOUNT() - is there other way??
Thread ID: 50646 Message ID: 50676 # Views: 4 # Ratings: 0
Version: Visual FoxPro 8 Category: Other
Date: Saturday, September 04, 2004 1:24:34 PM         
   


Hi Jefferson

> Is there another way of returning the total number of records in a
> table than RECCOUNT()?
> The problem with RECCOUNT() is it also includes the records marked
> for deletion, which i dont really need.
> Is there a way (aside from looping)? Or have just i omitted a command??

You can do it a number of ways, the only question is whether you care about moving the record pointer in the table or not.

If you don't want to move the record pointer, then use SQL:
SELECT COUNT(*) FROM table WHERE NOT DELETED() INTO ARRAY laJunk
lnRex = laJunk[1]


If you don't mind using the record pointer, and want a quicker result then use native VFP:
COUNT FOR NOT DELETED() TO lnRex




Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Akron, OH, USA

ENTIRE THREAD

RECCOUNT() - is there other way?? Posted by Jefferson Aguilar @ 9/4/2004 8:28:56 AM
RE: RECCOUNT() - is there other way?? Posted by Eric den Doop @ 9/4/2004 11:15:41 AM
RE: RECCOUNT() - is there other way?? Posted by Jefferson Aguilar @ 9/5/2004 11:18:25 AM
RE: RECCOUNT() - is there other way?? Posted by Boudewijn Lutgerink @ 9/4/2004 11:20:53 AM
RE: RECCOUNT() - is there other way?? Posted by Jefferson Aguilar @ 9/5/2004 11:30:05 AM
RE: RECCOUNT() - is there other way?? Posted by Boudewijn Lutgerink @ 9/6/2004 7:12:08 AM
RE: RECCOUNT() - is there other way?? Posted by Andy Kramek @ 9/4/2004 1:24:34 PM
RE: RECCOUNT() - is there other way?? Posted by Pete Sass @ 9/4/2004 5:27:24 PM
RE: RECCOUNT() - is there other way?? Posted by Jefferson Aguilar @ 9/5/2004 11:44:37 AM
RE: RECCOUNT() - is there other way?? Posted by Jefferson Aguilar @ 9/5/2004 11:38:28 AM