PDA

View Full Version : Record Counts



Joe Coley
9-Jul-2009, 06:29 AM
I seem to remember waaaay back someone posting a program which would report on the number of records in each of the files listed in filelist.cfg. We have the "percentage filled" utility that must use the record counts, but I'm not finding something that would show the actual number of records. Can anybody direct me to that old post I seem to have imagined--or perhaps share a code snippit that will do this? :confused: BTW -- native VDF database being used.

Garret Mott
9-Jul-2009, 06:40 AM
I seem to remember waaaay back someone posting a program which would report on the number of records in each of the files listed in filelist.cfg. We have the "percentage filled" utility that must use the record counts, but I'm not finding something that would show the actual number of records. Can anybody direct me to that old post I seem to have imagined--or perhaps share a code snippit that will do this? :confused: BTW -- native VDF database being used.

Hi Joe -

Check the help on a couple of attributes: DF_File_Max_Records & DF_File_Records_Used.

The latter even has the code:



DF_FILE_RECORDS_USED Procedure ShowRecordsUsed
Handle hTable
String sTable
Integer iNumRecords
Number nTotalRecords

Move 0 To hTable
Move 0 To nTotalRecords
Repeat
Get_Attribute DF_FILE_NEXT_USED Of hTable To hTable
If (hTable > 0) Begin
Open hTable
Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
Get_Attribute DF_FILE_RECORDS_USED Of hTable To iNumRecords
Showln sTable " -- " iNumRecords
Add iNumRecords To nTotalRecords
Close hTable
End
Until (hTable = 0)

Showln "Total -- " nTotalRecords
End_Procedure // ShowRecordsUsed
Just add in a line for DF_File_Max_Records & pretty up how it's displayed.

HTH

Peter Crook
9-Jul-2009, 06:41 AM
Hi Joe

How about DF_FILE_RECORDS_USED? The Help says: "This attribute represents the number of records currently in the table, not including deleted records. "

HTH

Peter

Vincent Oorsprong
9-Jul-2009, 07:05 AM
Joe,

Would you mean a program like the image attached?

Joe Coley
9-Jul-2009, 07:28 AM
That would be perfect -- is it in 15 somewhere?

Vincent Oorsprong
9-Jul-2009, 07:51 AM
Joe,

Find the source file attached. It is a v15 project.

Joe Coley
9-Jul-2009, 08:04 AM
Thank You! Thank You! Thank You!

Got it! Compiled it! (15 & 14.1), used it! Got info I needed!

Peter Crook
9-Jul-2009, 08:27 AM
Thanks Vincent

That was on my list of 'things to do when I had time' so is 'just what I wanted'!:)

Regards

Peter