Getting SQL Server 7.0 users with ADOX in VB6 
Author Message
 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



Fri, 28 Mar 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADOX.Append Creates a Read-Only Linked Table to SQL Server 7.0

2. ADOX And SQL Server Users

3. ADOX And SQL Server Users

4. ADOX - creating groups, users on SQL Server

5. ADOX And SQL Server Users

6. Can't get other users to connect to SQL Server 7.0 DB

7. Can't get other users to connect to SQL Server 7.0 DB

8. VB6.0 and SQL Server 7.0 OLAP Active X components -URGENT RESPONSE NEEDED

9. Dates, VB6 and SQL Server 7.0

10. SQL Server 7.0 problem with VB6?

11. SQL Server 7.0/VB6 Problems with bit and checkboxes

12. using DTS to import a text file in SQL Server 7.0 with VB6

 

 
Powered by phpBB® Forum Software