
Getting SQL Server 7.0 users with ADOX in VB6
I've tried to get users from the SQL Server 7.0 database Desktop Edition
using ADOX.
But for Users, Groups and Views collection I get error 3251: Object or
provider is not capable of performing requested operation.
I'm using MS ADO 2.5 (msado15.dll, msadox.dll ver. 2.50.4403.4).
I've tried to make the connection using all available providers, and also in
Access 2000 adp, but there's no way to get users and groups.
I'm working on WindowsNT 4.0 WS and Windows98.
Should I install MDAC 2.6?
Here is the simplified code (same as in many samples I've got from web)
'***********
Dim cnn As New ADODB.Connection
Dim cat As New ADOX.Catalog
Dim usr As ADOX.User
With cnn
.ConnectionString = "DSN=MYSQL;UID=sa;PWD=;"
.Open
End With
cat.ActiveConnection = cnn
For Each usr In cat.Users
Debug.Print usr.Name
Next usr
cnn.Close
Set cnn = Nothing
Set cat = Nothing
'***********
--
Rastko Potocnik