|
Home > Archive > Programming with dBASE > November 2005 > Best BDE Settings
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Mark.I 2005-11-24, 9:23 am |
| Hi All,
Does anyone know the optimum setting for the BDE, eg buffersize, min and max
memory, etc.
Thamks
Mark
| |
| Michael Nuwer [dBVIPS] 2005-11-24, 9:23 am |
| Mark.I wrote:
> Hi All,
>
> Does anyone know the optimum setting for the BDE, eg buffersize, min and max
> memory, etc.
I use the program below. The values are optimum for my uses.
//From: "Jan Hoelterling" < jhoelterling@compuse
rve.com>
// Define Windows data types for use by the extern command
#include <windef.h>
#include <winreg.h>
#define CR chr(13)+chr(10)
set procedure to registry.prg additive
reg = new registry(HKEY_LOCAL_
MACHINE, ;
" SOFTWARE\Borland\Dat
abase Engine\Settings\SYST
EM\INIT" )
lsh=reg.queryValue("LOCAL SHARE")
mbs=reg.queryValue("MINBUFSIZE")
xbs=reg.queryValue("MAXBUFSIZE")
ldr=reg.queryValue("LANGDRIVER")
mfh=reg.queryValue("MAXFILEHANDLES")
mms=reg.queryValue("MEMSIZE")
mstring=""
mchgmade=false
if lsh<>"TRUE"
mstring=mstring+"LOCAL SHARE from "+lsh+" to TRUE"+CR
reg.setvalue("LOCAL SHARE","TRUE")
mchgmade=true
endif
if val(mbs)<2048
mstring=mstring+"MINBUFSIZE from "+mbs+" to 2048."+CR
reg.setvalue("MINBUFSIZE","2048")
mchgmade=true
endif
if val(xbs)<8192
mstring=mstring+"MAXBUFSIZE from "+mbs+" to 8192."+CR
reg.setvalue("MAXBUFSIZE","8192")
mchgmade=true
endif
if LDR<>"DBWINWE0"
mstring=mstring+"LANGDRIVER from "+ldr+" to DBWINWE0."+CR
reg.setvalue("LANGDRIVER","DBWINWE0")
mchgmade=true
endif
if val(mfh)<2048
mstring=mstring+"MAXFILEHANDLES changed from "+mfh+" to 2048."+CR
reg.setvalue("MAXFILEHANDLES","2048")
mchgmade=true
endif
if val(mms)<32
mstring=mstring+"MEMSIZE from "+mms+" to 32."+CR
reg.setvalue("MEMSIZE","32")
mchgmade=true
endif
release reg
reg= new registry(HKEY_LOCAL_
MACHINE, ;
" Software\Borland\Dat
abase Engine\Settings\DRIV
ERS\DBASE\INIT" )
ldr=reg.queryValue("LANGDRIVER")
if LDR<>"DBWINWE0"
mstring=mstring+"dbase LANGDRIVER from "+ldr+" to DBWINWE0."+CR
reg.setvalue("LANGDRIVER","DBWINWE0")
mchgmade=true
endif
release reg
reg= new registry(HKEY_LOCAL_
MACHINE, ;
" Software\Borland\Dat
abase Engine\Settings\DRIV
ERS\DBASE\TABLE
CREATE" )
lvl=reg.queryValue("LEVEL")
if lvl<>"7"
mstring=mstring+"LEVEL from "+lvl+" to 5."+CR
reg.setvalue("LEVEL","7")
mchgmade=true
endif
release reg
// close proc :classes:registry.cc
if mchgmade
msgbox("The following changes were made to the BDE:"+CR+mstring+;
"The program needs to be restarted for these changes to take
effect.";
,"Information",64)
quit
endif
|
|
|
|
|