Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Win 3.11 vs. Win 95 & Too Many Files Open
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00046903
Message ID:
00048637
Views:
128
>>>>I've got a client who has Win 3.11 on her machine. She needs it to accommodate an outdated A/R system which will hopefully be replaced by the end of first quarter, next year, but until then, we have to make her VFP v.3 program work.
>>>>
>>>>Sometimes, she goes into the VFP program (a stand-alone EXE) and is able to get through all of her functions for hours. Other times she gets "Too Many Files Open" when she's doing certain tasks. However, if she runs the same networked product from a co-worker's machine, the one with Win 95, she NEVER has a problem. I figured that Win 95 uses separate sessions for the max files or something, and Win 3.11 pools from the same configuration for everything, but I'm not sure. I have been able to take care of the main problems with cleaner code (using arrays instead of cursors to populate combo boxes, etc.), but she still runs into the problem 2-3 times a day. Sometimes she's only in there for an hour before she receives them, even if she only does one or two things. She receives them more readily if she's been in and out of other products while running mine.
>>>>
>>>>All of my screens use the data environment whenever possible. Sometimes, SELECT statements are used to populate combo boxes, but the original file (SELECT Origfile.myfield1, myfield2 FROM Origfile INTO CURSOR myCursor) is always closed after that. I am under the ASSumption that cursors will close themselves when they are no longer in use--ie, when the form is closed, but perhaps that's where I'm wrong.
>>>>
>>>>I just ran a couple of the larger screens, the ones with more combo boxes which SELECT into cursors or arrays, and found, using DISPLAY STATUS, that it says that there are no files open when I leave those screens. Of course, this is what I want.
>>>>
>>>>Is it possible that DISP STAT isn't giving me the real picture? Is it possible that cursors can stay open even after the combo box (with the form) is destroyed? Is it possible that some of my data environment files are hanging open?
>>>>
>>>>Thanx,
>>>>JR
>>>JR,
>>>If this app is running on a Novell Network, open the PC's net.cfg file and add 'File Handles = nn' (nn being the number of files). I usually set them to the same amount as the files in the config.sys.
>>>
>>>Hope this helps
>>
>>Thank you, Bill, but the two of these added together already equal 250 or 255. If you can think of anything else, pls let me know (I should have already explained in the original question about the fact that the config.sys & network cfg were checked first--it was so long ago, I forgot! Thanx for your help, everyone--I'll attempt to fix w/George's SMARTDRV suggestion and let you all know how it went.
>
>Isn't there also an optional line you can add in the CONFIG.FP(W) file: FILES=##

Mark,

On a Novell network Windows95 uses the FILES= line in the config.sys while Windows 3.1, 3.11 use the FILE HANDLES= line in the net.cfg file. One thing I found was that the net.cfg file should be in the same directory as your network drivers and you should be in that directory when loading them in your AUTOEXEC.BAT for the NET.CFG file to be read, ie.
cd\net
ipx
netx
cd\
with \net being the directory with the drivers and NET.CFG file

Another thing I found in FoxPro 2.5 and 2.6 was that even though tables and cursors were being physically closed, FoxPro was NOT releasing the file handle. Don't know if the same is true for VFP 3 or 5.

Hope this helps.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform