Error under NT 4
I have an application that works fine under Win98 and Win2000 but gives a
problem under NT4. If the user is signed onto their PC using the local
domain and as administrator everything is OK. When they log onto the network
using a user name that has access to the installed directory they get
"Cannot start your application. The workgroup information file is missing or
opened exclusively by another
user.". Logged on as the same user I can open the database in Access without
any problem.
The code that's failing is below but I don't know exactly which point its
failing at as this is a customer site. I have checked the registry settings
and they are correct and accessible using regedit. adoConnfstrike is a
TADOConnection and I'm using Access 2000 as the db and d5 pro with the ado
express update.
Thanks in advance
Simon
procedure TdtmAdoStrike.DataModuleCreate(Sender: TObject);
// Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My
Documents\Simon\Abaris\Applications\First Strike\fstrike.mdb;Persist
Security Info=False;Jet OLEDB:System database=c:\my
documents\simon\abaris\applications\sage\secured.mdw
var
Registry: TRegistry;
begin
// Specify the connection string for the database
with adoConnFStrike do begin
Registry := TRegistry.Create;
try
with Registry do begin
// Move to the local machines key
RootKey := HKEY_LOCAL_MACHINE;
if OpenKey('Software\Abaris Computer Solutions\Strike', false)
then begin
try
// Get the DSN settings
Datasource := ReadString('Data source');
ConnectionString := 'Provider=' + ReadString('Provider') +
';Data Source=' + Datasource +
';Persist Security Info=False' +
';Jet OLEDB:System database=' +
ReadString('System Database') + ';';
finally
CloseKey;
end;
end;
end;
finally
Registry.Destroy;
end;
Open('<User name goes here>','<password goes here>');
end;
end;