G
Guest
I am using a sub that I pulled from a MS website to return the current users
of a database. The "JET_SCHEMA_USERROSTER" method.
I keep getting errors that state either I don't have the necessary
permissions to use the "database path here" or another error that states "The
database has been placed in a state by user 'my user name' on machine 'my
machine name' that prevents it from being opened or locked".
My database is tied to a WIF that limits user level security. I have tried
opening in exclusive and shared. Any suggestions? Thanks in advance for your
help.
Here is the code:
Global Const JET_SCHEMA_USERROSTER = _
"{947bb102-5d43-11d1-bdbf-00c04fb92675}"
Sub ReturnUserRoster()
Dim cnn As New ADODB.Connection
Dim rst As ADODB.Recordset
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=W:\PCM Interface Recycling\Database\PCM Interface
Recycling.mdb;"
Set rst = cnn.OpenSchema(adSchemaProviderSpecific _
, , JET_SCHEMA_USERROSTER)
Debug.Print rst.GetString
Set rst = Nothing
Set cnn = Nothing
End Sub
of a database. The "JET_SCHEMA_USERROSTER" method.
I keep getting errors that state either I don't have the necessary
permissions to use the "database path here" or another error that states "The
database has been placed in a state by user 'my user name' on machine 'my
machine name' that prevents it from being opened or locked".
My database is tied to a WIF that limits user level security. I have tried
opening in exclusive and shared. Any suggestions? Thanks in advance for your
help.
Here is the code:
Global Const JET_SCHEMA_USERROSTER = _
"{947bb102-5d43-11d1-bdbf-00c04fb92675}"
Sub ReturnUserRoster()
Dim cnn As New ADODB.Connection
Dim rst As ADODB.Recordset
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=W:\PCM Interface Recycling\Database\PCM Interface
Recycling.mdb;"
Set rst = cnn.OpenSchema(adSchemaProviderSpecific _
, , JET_SCHEMA_USERROSTER)
Debug.Print rst.GetString
Set rst = Nothing
Set cnn = Nothing
End Sub