If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > A problem with ADOX

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-04-03, 23:29
Shihab Shihab is offline
Registered User
 
Join Date: Dec 2002
Location: UAE
Posts: 8
Exclamation A problem with ADOX

Hello,
Could You Help Me???? I would be very thankfull

I have used AdOX.catalog to view users of a database and their permissions on this database.
I have written the following code

private sub Form_Load()

dim conn as new ADODB.Connection
dim sec as new ADOX.Catalog

con.Open "Provider=MSDAORA.1;User ID=ers;Data Source=ers;Persist Security Info=False", "ers", "hugo"
set sec.ActiveConnection = conn

Dim Permission As RightsEnum
Permission = sec.Users(0).GetPermissions("Orders", adPermObjTable)

End Sub

Where 'Orders' is a table in the Oracle Database 'ers'
It doesn't matter whether the database is Oracle or Access because the error appeares in the two cases

The error which face me is as follows:
(Object or provider is not capable of performing requested operation.)

Your friend, Shihab
Reply With Quote
  #2 (permalink)  
Old 01-05-03, 00:46
playernovis playernovis is offline
Registered User
 
Join Date: Nov 2002
Location: San Francisco
Posts: 251
I don't have Oracle, but with AccessXP it works just fine. I changed it little bit.... but it is still the same code. Try ORACLE not Microsoft provider.

As I said, I don't have Oracle here, but can't you look at ORACLE permisson tables?
http://www.ss64.com/orad/USER_TAB_PRIVS.html

jiri


Private Sub aaa()

Dim conn As New ADODB.Connection
Dim sec As New ADOX.Catalog
Dim Permission As RightsEnum

connString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin; " & _
" Data Source=E:\My Documents\My Desktop\mYDatabase.mdb;Mode=Share Deny None;" & _
" Jet OLEDBystem database=C:\PROGRA~1\COMMON~1\System\SYSTEM.MDW;Je t OLEDB:Registry Path=SOFTWARE\Microsoft\Office\10.0\Access\Jet\4.0 ; "

'con.Open "Provider=MSDAORA.1;User ID=ers;Data Source=ers;Persist Security Info=False", "ers", "hugo"

sec.ActiveConnection = connString
Permission = sec.Users(0).GetPermissions("Switchboard Items", adPermObjTable)

End Sub

Last edited by playernovis; 01-05-03 at 00:50.
Reply With Quote
  #3 (permalink)  
Old 01-05-03, 12:54
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Please post your access version of this problem - also which version of access are you using ?
Reply With Quote
  #4 (permalink)  
Old 01-05-03, 20:55
playernovis playernovis is offline
Registered User
 
Join Date: Nov 2002
Location: San Francisco
Posts: 251
I used AccessXP and ADO 2.7

if we talk about ms access - you HAVE TO include path to system.mdw in the connection string. If you don't do it, you will be able to open recordset, but you won't be able to get permissions...

jiri
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On