|
-
Mar 22nd, 2002, 12:42 PM
#1
Thread Starter
Lively Member
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?
-
Mar 22nd, 2002, 05:30 PM
#2
Frenzied Member
Is the system database definitely system.mdb, not system.mdw?
-
Mar 22nd, 2002, 05:37 PM
#3
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|