Board index » delphi » Error under NT 4

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;

 

Re:Error under NT 4


Quote
>"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.

it appears you are not setting the location of the Jet OLEDB:System database in
your connection string.  If this file isn't in the default location then you
won't be using the same security settings as Access so opening the database in
Access is not a relevant test

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Error under NT 4


I am reading the location of the system database from the registry and
setting it each time.  From my previous post there is a line that reads

                 ConnectionString := 'Provider=' + ReadString('Provider') +
                                     ';Data Source=' + Datasource +
                                     ';Persist Security Info=False' +
                                     ';Jet OLEDB:System database=' +
                                    ReadString('System Database') + ';';

where System Database is a key in the HKEY_LOCAL_MACHINE hive of the
registry.  I checked this using regedit logged on as both users and it is
the same. I also get the location of the mdb file in the same way. In terms
of opening it in Access is use a shortcut created by Access passing the same
security file as a parameter and this works. What else could I be doing
wrong?

Thanks for you help
Simon

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:i0uort8flu7mc5r7lqmt1tns33kj82tmsb@4ax.com...

Quote

> >"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.
> it appears you are not setting the location of the Jet OLEDB:System
database in
> your connection string.  If this file isn't in the default location then
you
> won't be using the same security settings as Access so opening the
database in
> Access is not a relevant test

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:Error under NT 4


Quote
>where System Database is a key in the HKEY_LOCAL_MACHINE hive of the
>registry.  I checked this using regedit logged on as both users and it is
>the same.

Do  the users with the problems have the same rights in the directory where the
system Database is located as the Administrator?
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Error under NT 4


As far as I know but I will check.  What rights do users need to be able to
use an Access db?

Thanks
Simon

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:rgrsrt059qsdo25sk621qmrnandb935p4o@4ax.com...

Quote

> >where System Database is a key in the HKEY_LOCAL_MACHINE hive of the
> >registry.  I checked this using regedit logged on as both users and it is
> >the same.

> Do  the users with the problems have the same rights in the directory
where the
> system Database is located as the Administrator?
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:Error under NT 4


Quote
>As far as I know but I will check.  What rights do users need to be able to
>use an Access db?

read,write ,create and delete
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads