Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error: too many files open 4

Status
Not open for further replies.

monikai

Programmer
Aug 4, 2002
358
PL
Hi !
How many files i can open in FP2.6 ? And can i change it ? (if i remember: yes but, i dont't know how)

Monika from Warszawa (Poland)
(monikai@yahoo.com)
 
You should be able to change it in config.sys or config.nt or whatever it is on your machine

files=20
 
What system do you have? You can change it in c:\config.sys in Win95/98, in win.ini in WinME, in c:\winnt\config.nt in WinNT/2k.

Recommended is FILES=60 or higher.
 
Monika,
As the others have hinted at, FPD and FPW can actually open up to 225 tables - potentially 675 files (with associated .CDX and .FPT files). This is more than any of the current OS's allow for Win 3.x or DOS based programs.

Rick
 
we run FILES = 240
on 98se/2000 and XP and is usually more than sufficient on quite a large product.
[bigears]
 
Very thanks for your help. I am frightened working with FP !

Monika from Warszawa (Poland)
(monikai@yahoo.com)
 
If you have Windows Millennium, then you have to go to Start/Run and run MSCONFIG. Here are the instructions:
faq182-608

By the way, I do not recommend setting the files greater than 225. The more recent Windows versions will not accept any values higher than that since by default they already have a meager 30 files enabled by default. So the preset 30 plus your optional setting up to 225 equals 255, the real maximum.

I really think they set the default so low (we had lots of RAM in memmory by that time) so that users could go back to the salesman and order a "more powerful machine" using Windows 200o or XP. They wanted Win98 and WinMe only for "simple" home use anyway.

 
Note: MEMLIMIT and MVCOUNT are meaningless in CONFIG.SYS or CONFIG.NT files - these are strictly FoxPro settings and should only be used in CONFIG.FP (or CONFIG.FPW) files.

Rick
 
I tried the FAQ182-608 mentioned above for Windows Millenium, but i'm still getting the "too many files open" error. Any ideas what else I'm missing?

Richard
 
"Too many files open" in XP. Same problem. Can anyone tell me how to change the "FILES=xxx" in XP?
 
You can either change it globally, by changing (adding?) the FILES= line in the the CONFIG.NT (usually in C:\Windows\system32\ in XP),
OR
in the Link (.LNK) file for the application click on properties. Go to the Program tab, and click on the Advanced button and change the Config.NT to point to a different file just for this application. (If you have a lot of DOS / Win 3.x programs, this is a better option - it should save startup time and memory resources for those apps that don't need this many files!)

Rick
 
Thanks for all the responses so far! Unfortunately I'm still getting the same error. I don't know if it matters but my pc is running a 1.8Ghz Athlon with 256Mb memory.

This is what HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\Environment looks like on my pc:

Code:
AutoexecEnvCRC              0x52e0fedd (1390477021)
AutoexecEnvMod              0x2f4db42f (793621551)
AutoexecEnvSize             0x00000142 (322)
COMSPEC                     "C:\WINDOWS\COMMAND.COM"
ConfigEnvCRC                0x00000000 (0)
ConfigEnvMod                0x2f4db42f (793621551)
ConfigEnvSize               0x00000000 (0)
EnvAction                   0x00000000 (0)
FILES                       0x000000e1 (225)
PATH                        <<too many dirs to type>>
PROMPT                      &quot;$p$g&quot;
RegEnvCRC                   0xedddf602 (3990746626)
RegEnvSize                  0x0000010f (271)
TEMP                        &quot;C:\WINDOWS\TEMP&quot;
TMP                         &quot;C:\WINDOWS\TEMP&quot;
winbootdir                  &quot;C:\WINDOWS&quot;
windir                      &quot;C:\WINDOWS&quot;
I have also set PerVMFiles=225 in System.ini via the System Configuration Utility.

Any ideas what I'm doing wrong??
 
Are you trying to open these files locally or on a network file server? What OS is the file server running? What network client are you using? (For these last two answers please include version and service pack or patch level.)

Rick
 
Just trying to open the files locally. Not sure which service pack is there since no info is showing up in the System Properties window. Running Windows ME 4.90.3000.

-- Richard
 
rpowell265,

When you created the new line in MSCONFIG as specified by FAQ182-608, did you make sure you placed it within the 386Enh folder? A few times when I was adding that line to WinMe workstations I clicked on the &quot;+&quot; sign for the 386Enh folder which displayed the items within 386Enh, but when I clicked on the 'New' button, it added the line to another folder named [boot], the folder currently selected since it was at the top of the folder list. I had failed to click on the name [386Enh] first. Just to be sure, could you open MSCONFIG again and make sure that line PerVMFiles=225 is in the 386Enh folder and not another? As mentioned above, 225 is the maximum value possible, but I always use a smaller number such as 50 and it works in every installation I've made.

dbMark
 
Just verified that PerVMFiles=225 is under the 386Enh folder but still getting the &quot;too many files open&quot; error. Any other setting needed?
 
Richard,
simple possibility is real exceed 225 files.
Useing many SQL commands, for example
create table, select.. into table without close it,
or frequent &quot;sele 0&quot; without close it ?
Try
disp status
to see really exhausted files before error line...
Tesar
 
2 threads here.

(1) Monikai's original question.
How many files i can open in FP2.6 ?
255 file handles (areas) and the syntax to open is
USE FILENAME ALIAS MYALIAS IN 0 && putting in 0 opens in the next work area.
To actually use it,
SELECT MYALIAS ...

(2) OS limit for application.
DOS limit. (Guessing FPD2.6 for DOS). 5 reserved for STDIN, STDOUT, STDERR, LPT: and COM1: (source = Novell press DOS and Micro hardware).
In DOS or WWG or W95 o W98. \CONFIG.SYS is the place and I believe it's 100 limit.

In NT, you have to look up the setting pointed in the shortcut properties and look for the correct CONFIG.NT (This can be customised for each shortcut).

For ME, faq152-608 in FP for DOS worked for me.
***
Microsoft: FoxPro (versions 1 through 2.6) FAQ
forum182

FoxPro Enviroment
WinMe - Setup to solve Too Many Files Open Error
faq182-608

Edit the system.ini file (windows directory)
Locate [386enh] section
and add the following line

PerVMFiles = 225

Save the file and then restart the WinME.

The maximum number you can use above is 225 while a lesser number enables only that many+30 files at a time to be opened as maximum file handles.

This is the Config.sys statement Files = nnn equivalent.
***
End
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top