Workgroupfile

E

Eddy Maas

Hi,

Sorry for long message...

I found this routine blow and that really handy but the
database is secured and the secured workgroup file is on
the network. Does anybody know what i have to change so
that i can use this below ? I have tried it myself several
times but i get the message that i'm not allowed the open
the DB.
The workgroup file is L:\Pallet
registratie\Workgroup\secured.mdw

Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long

cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=L:\Pallet registratie\DB\pallet
registratie.mdb"

cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=L:\Pallet registratie\DB\pallet
registratie.mdb"

' The user roster is exposed as a provider-specific
schema rowset
' in the Jet 4 OLE DB provider. You have to use a
GUID to
' reference the schema, as provider-specific schemas
are not
' listed in ADO's type library for schema rowsets

Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

'Output the list of all users in the current database.

Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _
"", rs.Fields(2).Name, rs.Fields(3).Name

While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields(2), rs.Fields(3)
rs.MoveNext
Wend

End Sub
 
J

Joseph Meehan

Have you tried starting the local database using the workgroup in
question? I don't know if that would help, but it can't hurt.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top