Board index » delphi » Question on MAXFILEHANDLES setting in BDE

Question on MAXFILEHANDLES setting in BDE

Hi everyone !

Once in a while I get a message from my app using BDE that "the maximum file
handles has been exceeded" so I increase the setting in BDE and it works
fine after than.

Is the value for MaxFileHandles correspond to the number of tables that are
open ?  Is this a 1 maxfilehandle = 1 table or is there  a different ratio ?

Thanks in advance.

Regards,

Dexter Baga

--
~. .~
 -----
  V

 

Re:Question on MAXFILEHANDLES setting in BDE


No. The BDE can open more files than the MaxFileHandles setting by using
virtual file handles. There is no way that I have every seen to calculate
when you will run out of file handles.

--
Bill

Re:Question on MAXFILEHANDLES setting in BDE


Bill,

Thanks for the response.  Just curious though..I had it set to 64 but when
my app gets the error message I tried to set it to 256 and since then I
never had the problem anymore { or at least for the the last 5 days }.

What is this MaxFileHandles for then if it is not about the number of tables
that are open.  I hope you have an answer for this so that I can try to
debug my app properly as to why I'm getting the "maximum file handles has
been exceeded" error message.

Thanks.

Have a nice weekend !

Regards,

Dexter Baga
--
~. .~
 -----
  V
"Bill Todd (TeamB)" <billtodd...@nospam.qwest.net> wrote in message
news:3b3cbc70_1@dnews...

Quote
> No. The BDE can open more files than the MaxFileHandles setting by using
> virtual file handles. There is no way that I have every seen to calculate
> when you will run out of file handles.

> --
> Bill

Re:Question on MAXFILEHANDLES setting in BDE


MaxFileHandles specifies the maximum number of Windows file handles that the
BDE will use. If you have MaxFileHandles set to 48 and the BDE needs to open
64 files it plays some neat games to share the 48 file handles among the 64
files. Using a lot of Windows file handles used to be a problem,
particularly in 16 bit Windows. Setting MaxFileHandles up in Win98 and above
does not cause problems.

File handles do not correspond to tables. Suppose you open a Paradox table.
Paradox tables consist of multiple disk files. The BDE will need one file
handle for the .DB file, one for the primary index, two for each secondary
index, one for the .MB file and one for the .VAL file.

I hope this clarifies things.

--
Bill

Other Threads