-
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?
-
Is the system database definitely system.mdb, not system.mdw?
-
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