RE: VFP9SP1 How to determine # of rows using LLFF operations

Author: Tracy Pearson

Posted: 2011-08-09 at 16:32:53

Mike,

You know the record length of the file in question?

liHandle = FOPEN(this.InputFile)

if liHandle > 0

lnFileSize = fseek(liHandle, 0, 2) && get the file size

=fseek(liHandle, 0, 0) && put the pointer back at the begining

lnRows = lnFileSize / lnLength

DO WHILE NOT FEOF(liHandle)

&& ...

ENDDO

ENDIF

This won't work if the data is not a fixed width.

Otherwise you can use LEN() to add up the size of each returned line and

display a percentage of completion.

lnAmountRead = lnAmountRead + LEN(m.LineOfText)

lnPercent = lnAmountRead / lnFileSize

WAIT WINDOW NOWAIT " Processing " + trans(lnPercent * 100, "999.99%")

Tracy Pearson

PowerChurch Software

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/001f01cc56d3$83d19360$8b74ba20$@powerchurch.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 Tracy Pearson