Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Small .prg slows network
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00060184
Message ID:
00060302
Views:
30
>>I run a .prg to count the occurances of certain field contents on a file with 800000 records.
>>
>>another user (next to me) tries to bring up printer properties and gets the hour glass but no properties.
>>
>>I escape out of the .prg and his printer properties appear...
>>
>>What could cause this?
>Larry,
>
>If your prg is pounding at the server without allowing for anyone else to get a word in edgerwise then that would explain what you see. Why not post the small PRG and see anyone can give you any advice about how to get it to better behave in a network environment.

That's a great idea...

Here it is:

the objective is to count number of (active) people
in each district / age_group

***********************************************************
CLOS ALL
CLEA ALL
CLEA

SET EXCL OFF
SET TALK OFF
SET ESCA ON
SET SAFE OFF
SET DELE ON

USE MasterFile
COPY STRU TO CountFile

SELECT 0
USE CountFile EXCL
INDEX ON DISTRICT + AGEGRP TAG DISTRICT

SELECT MasterFile
nCount = 0
SCAN
nCount = nCount + 1
@ 05,02 SAY nCount
*
IF INACTIVE <> 'Y'
cAgeGrp = AGEGRP
cDistrict = DISTRICT
*
* increment total
IF ! SEEK(cDistrict + cAgeGrp,"CountFile","District")
INSERT INTO CountFile (DISTRICT,AGEGRP) VALUES (cDistrict, cAgeGrp)
ENDIF
REPLACE TOTAL WITH TOTAL + 1 IN CountFile
ENDIF
ENDSCAN
***********************************************************
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform