Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Showing Progress
Message
From
14/05/1998 09:47:42
 
 
To
13/05/1998 14:23:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00099060
Message ID:
00099402
Views:
43
Robert, the way I update the progress bar assumes that I know how many records I will be appending before I start. When appending an SDF file, I simply FOPENed the file, checked the size, and divided by the record length to find out how many recs I was going to append. The value is stored in lnRecords in this example. Also, in this example I am appending to an empty cursor. You would need to modify the logic in the routine that does the updating so that you don't factor pre-existing records in your table into the thermometer update.
Let me know if you are still have trouble. I am leaving for DevCon on Saturday, but I will be able to help you up until Friday afternoon.

* Update a thermometer during the append process
THISFORM.shpPayrollProg.SetRange(1, m.lnRecords)
* Load the ADP data - the FOR clause is used to update
* the progress thermometer
SELECT DRH116
cForClause = 'THISFORM.UpdPayrollTherm()'
APPEND FROM (m.lcADPData) TYPE SDF FOR &cForClause

* Here is the code in THISFORM.UpdPayrollTherm()

* Update after every 20 records
IF MOD(RECNO('DRH116'), 20) = 0
THISFORM.shpPayrollProg.Update(RECNO('DRH116'))
ENDIF

RETURN .T.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform