ADOX and Permissions 
Author Message
 ADOX and Permissions

Greetings,

I am not very good with ADO yet, but I want to explore how to set/get
permissions for users.

So far I have been able to determine that I have to reference yet another
library (ADOX) to accomplish this.   The following code is virtually copied
verbatim out of of MSDN.  Yet, when I try and execute this, I receive:

 error '3251'
"Operation requested by the application is not supported by the provider".

This fails on the "getpermissions" line.

I tried this on the "NWind.mdb" with the "Orders" table, same results.  So
it can't be my database.  I have built a whole application around this
database with nothing but success with all types of queries and the like.
All with the same "Provider".

The "Catalog" object has all kinds or properties on inspection under debug,
and no reported errors.

Any tips?

Thanks,
DWilliams

    Dim cnn As New ADODB.Connection
    Dim cat As New ADOX.Catalog
    Dim lngPerm As Long
    Dim DBName As String

    DBName = "C:\CCenter\Controls\CCenter.mdb"

    Conn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
    & "Persist Security Info=True;" _
    & "Data Source=" & DBName & ";" _
    & "User ID=Admin;" _
    & "Password=;"

    cnn.Open Conn

    Set cat.ActiveConnection = cnn

    lngPerm = cat.Users("admin").GetPermissions("tblMain", adPermObjTable)
    Debug.Print "Original permissions: " & Str(lngPerm)

    'other code for get/set permissions...



Fri, 30 Aug 2002 03:00:00 GMT  
 ADOX and Permissions
my advice is not to waste another moment trying to use ADOX to work
with Access permissions. it's broken with no workarounds. it doesn't
work with access objects (forms, reports, etc) and doesn't have DAO's
AllPermissions to check implicit permissions when it does work with
tables and queries. when working with permissions in access, stick to
DAO.

On Mon, 13 Mar 2000 18:21:19 -0600, "DWilliams"

Quote:

>Greetings,

>I am not very good with ADO yet, but I want to explore how to set/get
>permissions for users.

>So far I have been able to determine that I have to reference yet another
>library (ADOX) to accomplish this.   The following code is virtually copied
>verbatim out of of MSDN.  Yet, when I try and execute this, I receive:

> error '3251'
>"Operation requested by the application is not supported by the provider".

>This fails on the "getpermissions" line.

>I tried this on the "NWind.mdb" with the "Orders" table, same results.  So
>it can't be my database.  I have built a whole application around this
>database with nothing but success with all types of queries and the like.
>All with the same "Provider".

>The "Catalog" object has all kinds or properties on inspection under debug,
>and no reported errors.

>Any tips?

>Thanks,
>DWilliams

>    Dim cnn As New ADODB.Connection
>    Dim cat As New ADOX.Catalog
>    Dim lngPerm As Long
>    Dim DBName As String

>    DBName = "C:\CCenter\Controls\CCenter.mdb"

>    Conn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
>    & "Persist Security Info=True;" _
>    & "Data Source=" & DBName & ";" _
>    & "User ID=Admin;" _
>    & "Password=;"

>    cnn.Open Conn

>    Set cat.ActiveConnection = cnn

>    lngPerm = cat.Users("admin").GetPermissions("tblMain", adPermObjTable)
>    Debug.Print "Original permissions: " & Str(lngPerm)

>    'other code for get/set permissions...



Sat, 31 Aug 2002 03:00:00 GMT  
 ADOX and Permissions
Mary,

Thanks for the tip.  I know ADO has it's problems.  (what doesn't these
days).  As a  matter of fact, the only reason I'm even considering it is
because I wanted to write a db front end in Excel.   The only ActiveX
datacontrol I could find (free) is the ADO version.

Upon further investigation, I found MS's "Component Checker" on the UDA
site.  It reports that I have 'MDAC version 2.1.3711.11 (GA) '.   While
looking through their updated ADO versions for download, there is no such
animal, there is a version MDAC 2.1.1.3711.11 (GA), and a version
2.1.2.4202.3 (GA) , and of course the newest version, 2.5 RTM
(2.50.4403.12).  Whatever version I have, came with Visual Basic SP3.  Even
the component checker is broke.

Ah well, back to DAO...

DWilliams


Quote:
> my advice is not to waste another moment trying to use ADOX to work
> with Access permissions. it's broken with no workarounds. it doesn't
> work with access objects (forms, reports, etc) and doesn't have DAO's
> AllPermissions to check implicit permissions when it does work with
> tables and queries. when working with permissions in access, stick to
> DAO.

> On Mon, 13 Mar 2000 18:21:19 -0600, "DWilliams"

> >Greetings,

> >I am not very good with ADO yet, but I want to explore how to set/get
> >permissions for users.

> >So far I have been able to determine that I have to reference yet another
> >library (ADOX) to accomplish this.   The following code is virtually
copied
> >verbatim out of of MSDN.  Yet, when I try and execute this, I receive:

> > error '3251'
> >"Operation requested by the application is not supported by the
provider".

> >This fails on the "getpermissions" line.

> >I tried this on the "NWind.mdb" with the "Orders" table, same results.
So
> >it can't be my database.  I have built a whole application around this
> >database with nothing but success with all types of queries and the like.
> >All with the same "Provider".

> >The "Catalog" object has all kinds or properties on inspection under
debug,
> >and no reported errors.

> >Any tips?

> >Thanks,
> >DWilliams

> >    Dim cnn As New ADODB.Connection
> >    Dim cat As New ADOX.Catalog
> >    Dim lngPerm As Long
> >    Dim DBName As String

> >    DBName = "C:\CCenter\Controls\CCenter.mdb"

> >    Conn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
> >    & "Persist Security Info=True;" _
> >    & "Data Source=" & DBName & ";" _
> >    & "User ID=Admin;" _
> >    & "Password=;"

> >    cnn.Open Conn

> >    Set cat.ActiveConnection = cnn

> >    lngPerm = cat.Users("admin").GetPermissions("tblMain",
adPermObjTable)
> >    Debug.Print "Original permissions: " & Str(lngPerm)

> >    'other code for get/set permissions...



Sat, 31 Aug 2002 03:00:00 GMT  
 ADOX and Permissions
i guess your situation fits the old adage, "if it ain't broke, don't
fix it". thankfully they're not messing with DAO these days, so it
works <g>.

On Tue, 14 Mar 2000 18:07:52 -0600, "DWilliams"

Quote:

>Mary,

>Thanks for the tip.  I know ADO has it's problems.  (what doesn't these
>days).  As a  matter of fact, the only reason I'm even considering it is
>because I wanted to write a db front end in Excel.   The only ActiveX
>datacontrol I could find (free) is the ADO version.

>Upon further investigation, I found MS's "Component Checker" on the UDA
>site.  It reports that I have 'MDAC version 2.1.3711.11 (GA) '.   While
>looking through their updated ADO versions for download, there is no such
>animal, there is a version MDAC 2.1.1.3711.11 (GA), and a version
>2.1.2.4202.3 (GA) , and of course the newest version, 2.5 RTM
>(2.50.4403.12).  Whatever version I have, came with Visual Basic SP3.  Even
>the component checker is broke.

>Ah well, back to DAO...

>DWilliams



>> my advice is not to waste another moment trying to use ADOX to work
>> with Access permissions. it's broken with no workarounds. it doesn't
>> work with access objects (forms, reports, etc) and doesn't have DAO's
>> AllPermissions to check implicit permissions when it does work with
>> tables and queries. when working with permissions in access, stick to
>> DAO.

>> On Mon, 13 Mar 2000 18:21:19 -0600, "DWilliams"

>> >Greetings,

>> >I am not very good with ADO yet, but I want to explore how to set/get
>> >permissions for users.

>> >So far I have been able to determine that I have to reference yet another
>> >library (ADOX) to accomplish this.   The following code is virtually
>copied
>> >verbatim out of of MSDN.  Yet, when I try and execute this, I receive:

>> > error '3251'
>> >"Operation requested by the application is not supported by the
>provider".

>> >This fails on the "getpermissions" line.

>> >I tried this on the "NWind.mdb" with the "Orders" table, same results.
>So
>> >it can't be my database.  I have built a whole application around this
>> >database with nothing but success with all types of queries and the like.
>> >All with the same "Provider".

>> >The "Catalog" object has all kinds or properties on inspection under
>debug,
>> >and no reported errors.

>> >Any tips?

>> >Thanks,
>> >DWilliams

>> >    Dim cnn As New ADODB.Connection
>> >    Dim cat As New ADOX.Catalog
>> >    Dim lngPerm As Long
>> >    Dim DBName As String

>> >    DBName = "C:\CCenter\Controls\CCenter.mdb"

>> >    Conn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
>> >    & "Persist Security Info=True;" _
>> >    & "Data Source=" & DBName & ";" _
>> >    & "User ID=Admin;" _
>> >    & "Password=;"

>> >    cnn.Open Conn

>> >    Set cat.ActiveConnection = cnn

>> >    lngPerm = cat.Users("admin").GetPermissions("tblMain",
>adPermObjTable)
>> >    Debug.Print "Original permissions: " & Str(lngPerm)

>> >    'other code for get/set permissions...



Sun, 01 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Permissions problem with ADOX and CreateProcess() on WinXP Pro

2. ADOX.Indexes/ADOX.Key/Foreign Keys

3. Win2K Changed My Permissions Without My Permission

4. What is this ADOX? Can you create a Table using ADO or must you use ADOX?

5. ADOX.catalog error.

6. To determine standard value - ADOX or ADO

7. Changing the reference to the ADOX library on the fly

8. Maintaining tables via ADOX an A2000

9. ADOX.Catalog

10. ADOX Table (desperate)

11. Running stored procedure via ADOX

12. Unable to open any help topic on ADOX

 

 
Powered by phpBB® Forum Software