Results 1 to 3 of 3

Thread: ADOX and Access 2000

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    82

    ADOX and Access 2000

    I'm trying to add new users to an Access 2000 database using ADOX. I basically copied MS's code from the MSDN site as follows:

    Code:
    Dim cat As ADOX.Catalog
        Dim usrNew As ADOX.User
        Dim usrLoop As ADOX.User
        Dim grpLoop As ADOX.Group
        
        Set cat = New ADOX.Catalog
        cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "Data Source=c:\Program Files\" & _
            "Microsoft Office\Office\Samples\Northwind.mdb;" & _
            "jet oledb:system database=c:\samples\system.mdb"
    
        With cat
           
            ' Create and append new user with an object.
            Set usrNew = New ADOX.User
            usrNew.Name = "Pat Smith"
            usrNew.ChangePassword "", "Password1"
            .Users.Append usrNew
    There's more below this, but it is failing on the ".Users.Append usrNew" line. The error is that "Object or provider is not capable of performing requested operation", Error #3251.

    Can anyone help?

  2. #2
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313
    Is the system database definitely system.mdb, not system.mdw?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    82
    Sorry...I just cut and pasted for the purposes of the post. My code does reflect the correct MDW file. BTW, the connection appears to work properly.

    Thanks,
    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width