DataBase Permisions

DataBase Permisions

Anonymous
Not applicable
160 Views
3 Replies
Message 1 of 4

DataBase Permisions

Anonymous
Not applicable
Hi All,

 

Here is one I can not figure out and am hoping that some of you database
masters out there can help me out.  I have a connection to my desired
database.  I know this connection works because I have tested it with other
databases I have.  This database is special in that it requires a special
"Work Group Admin" privilege to be set on the system and a password to even read
from it.

 

The database has to stay this way because of some proprietary software we
have that is connected to it.  Basically we go into the WinNT\System32\
directory and run the program: WRKGADM.EXE.  This allows us to select the
desired (.MDW -Microsoft Access workgroup information file).  Instead of
using the default (System.mdw) we have one that was created for us called
(master_Factrack.mdw)  Now when I join this "Work Group Administrator" I
have access to open edit and read the desired database table as long as I enter
the password upon opening the database.

 

System.mdw file is loaded and I open the database, when I try to open a
table I get the following error message from Access: "Couldn't read definitions;
no read definitions permission for table or query 'tblfacilities'.  and the
table does not open.

 

If the special file (master_Factrack.mdw) is loaded then the database opens
fine with the password.

 

Now, when I try to connect to a field through VBA, with either the
System.mdw or the master_Factrack.mdw loaded, I get the following error from
VBA: "Record(s) cannot be read; no read permissions on 'tblFacilities'. 
And the macro ends.

 

My question is... how do I get around this?  Is there a way to load
the necessary password and login into the VBA code to open the database and
desired table?

 

Please Help.  Sorry its so long but I wanted to make sure I provided
all info required.

 

Thanx in advance,

 

Rob
0 Likes
161 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Hi Rob,

 

This works for me in VB6.  You might try it in your
situation

 

dim xyzWorkspace as Workspace

 

DBEngine.SystemDB = "<complete
path>\master_Factrack.mdw"
Set SpecWorkSpace =
DBEngine.CreateWorkspace("New", "username", "password")

 

You can find information about DBEngine, SystemDB and
workspaces in the Microsoft DAO help file which comes with VB6.

 

Hope this helps

 

David
0 Likes
Message 3 of 4

Anonymous
Not applicable
 I use the following in code in VB6
to set up my connection to a protected database.  Just Ignore me
If I am off track 🙂   

   

  Dim cn As
ADODB.Connection
   
    With
cn
        .Provider =
"Micrsoft.Jet.OLEDB.4.0"
       
.Properties("Data Source") =
"c:\test.mdb"
        .Properties("Jet
OLEDB:System database") =
"c:\test.mdw"
        .Open
USERID:="User", Password:="letmein"
    End With


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

Hi All,

 

Here is one I can not figure out and am hoping that some of you database
masters out there can help me out.  I have a connection to my desired
database.  I know this connection works because I have tested it with
other databases I have.  This database is special in that it requires a
special "Work Group Admin" privilege to be set on the system and a password to
even read from it.

 

The database has to stay this way because of some proprietary software we
have that is connected to it.  Basically we go into the WinNT\System32\
directory and run the program: WRKGADM.EXE.  This allows us to select the
desired (.MDW -Microsoft Access workgroup information file).  Instead of
using the default (System.mdw) we have one that was created for us called
(master_Factrack.mdw)  Now when I join this "Work Group Administrator" I
have access to open edit and read the desired database table as long as I
enter the password upon opening the database.

 

System.mdw file is loaded and I open the database, when I try to open a
table I get the following error message from Access: "Couldn't read
definitions; no read definitions permission for table or query
'tblfacilities'.  and the table does not open.

 

If the special file (master_Factrack.mdw) is loaded then the database
opens fine with the password.

 

Now, when I try to connect to a field through VBA, with either the
System.mdw or the master_Factrack.mdw loaded, I get the following error from
VBA: "Record(s) cannot be read; no read permissions on 'tblFacilities'. 
And the macro ends.

 

My question is... how do I get around this?  Is there a way to load
the necessary password and login into the VBA code to open the database and
desired table?

 

Please Help.  Sorry its so long but I wanted to make sure I provided
all info required.

 

Thanx in advance,

 

Rob
0 Likes
Message 4 of 4

Anonymous
Not applicable
Hi David and Paul,

 

Thanx for the help.  I have finally go tit
working with your help.

 

Rob


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

 I use the following in code in VB6
to set up my connection to a protected database.  Just Ignore me
If I am off track 🙂   

   

  Dim cn As
ADODB.Connection
   
    With
cn
        .Provider =
"Micrsoft.Jet.OLEDB.4.0"
       
.Properties("Data Source") =
"c:\test.mdb"
        .Properties("Jet
OLEDB:System database") =
"c:\test.mdw"
        .Open
USERID:="User", Password:="letmein"
    End
With


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Hi All,

 

Here is one I can not figure out and am hoping that some of you
database masters out there can help me out.  I have a connection to my
desired database.  I know this connection works because I have tested
it with other databases I have.  This database is special in that it
requires a special "Work Group Admin" privilege to be set on the system and
a password to even read from it.

 

The database has to stay this way because of some proprietary software
we have that is connected to it.  Basically we go into the
WinNT\System32\ directory and run the program: WRKGADM.EXE.  This
allows us to select the desired (.MDW -Microsoft Access workgroup
information file).  Instead of using the default (System.mdw) we have
one that was created for us called (master_Factrack.mdw)  Now when I
join this "Work Group Administrator" I have access to open edit and read the
desired database table as long as I enter the password upon opening the
database.

 

System.mdw file is loaded and I open the database, when I try to open a
table I get the following error message from Access: "Couldn't read
definitions; no read definitions permission for table or query
'tblfacilities'.  and the table does not open.

 

If the special file (master_Factrack.mdw) is loaded then the database
opens fine with the password.

 

Now, when I try to connect to a field through VBA, with either the
System.mdw or the master_Factrack.mdw loaded, I get the following error from
VBA: "Record(s) cannot be read; no read permissions on
'tblFacilities'.  And the macro ends.

 

My question is... how do I get around this?  Is there a way to
load the necessary password and login into the VBA code to open the database
and desired table?

 

Please Help.  Sorry its so long but I wanted to make sure I
provided all info required.

 

Thanx in advance,

 

Rob
0 Likes