Subject Error accessing database
Author Hartmut Matzke
On a W2K and on a WXP system I have randomly problem with the startup of
my
application. The application is multithreaded where each thread is
making
it's own connection (at least I am quite sure). After the main thread
starts
and opened succesfully the first connection on starting the other
threads I
am getting following error messages:

>>>>>>>>>>
I/O error for file "D:\A2156\DBINTE~2\DATABASE.GDB"
Error while trying to access file
The process cannot access the file because it is being used by another
process.
<<<<<<<<<<<

When I than kill the application via task manager FB server (1.02) seems
to
hang and still hold a connection to the database. It can't be stopped
via
the control panel. One more thing to mention:

In the connection parameters I have got the following:

function TKonfig.DataBaseParams: TStrings;
begin
   Result := TStringList.Create;
   Result.Add('user_name=' + DataBaseUser);
   Result.Add('password=' + DataBasePWD);
   Result.Add('lc_ctype=' + DataBaseCharSet);
   IF NOT ReadOnlyDatabase THEN
     BEGIN
       Result.Add('isc_dpb_force_write=1');
       Result.Add('isc_dpb_sweep_interval=0');
     END;
end;

Could repeating the force write setting cause problems, or otherway
asked is
it allowed to change force writes and sweep ONLY if there is no other
connection to the database?

Thanks in advance

Hartmut