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:
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.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
Can anyone help?




Reply With Quote