How to change driver settings at run-time? ...DBASE\TABLE CREATE\LEVEL=5


2005-01-25 02:23:05 PM
off-topic10
I need to change my DBASE (or PARADOX) driver settings at run-time (on
FormCreate) esp. setting "LEVEL"="5" (by default LEVEL=7) so my newly
created table(s) would be compatible with other/older programs working
with them.
So far I tried: bdn.borland.com/article/0,1410,20193,00.html
procedure TForm1.FormCreate(Sender: TObject);
var DriverParams: TStringList;
begin
DriverParams := TStringList.Create;
try
DriverParams.Add('LEVEL=5');
session.ModifyDriver('DBASE',DriverParams); // went ok but alas :(
// table1.CreateTable is LEVEL 7 table
// session.SaveConfigFile; {I wont it for current session only}
finally
DriverParams.Free;
end;
end;
and I don't wont to write to Registry to solve that : anyway all bde
programs must be restarted after for this to take effect which is impossible
[HKEY_LOCAL_MACHINE\Software\Borland\Database Engine\Settings\DRIVERS\DBASE]
[HKEY_LOCAL_MACHINE\Software\Borland\Database
Engine\Settings\DRIVERS\DBASE\INIT]
"VERSION"="3.0"
"TYPE"="FILE"
"LANGDRIVER"="DB437US0"
[HKEY_LOCAL_MACHINE\Software\Borland\Database
Engine\Settings\DRIVERS\DBASE\TABLE CREATE]
"LEVEL"="5"
"MDX BLOCK SIZE"="1024"
"MEMO FILE BLOCK SIZE"="1024"