Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Data from one db to another?

Status
Not open for further replies.

Wulfdog

MIS
Feb 19, 2001
88
0
0
US
Is it possible to pass data from one database to another...and I am not talking about tables. I would like to open another database from one database and pass login parameters to it to ensure the user has rights.

What do you think?

Nick
 
User information is kept in the system.mdw file. Here is an example of reading data using the ADOX library to access the system information.


Function JetSecurity()
'-- set reference to ADOX library
'- Microsoft ADO Ext. 2.6 for DDL and Security
'-- Microsoft ActiveX data objects 2.6 library also needed for ADO
Dim cn As New ADODB.Connection

cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Properties("Data Source") = _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
cn.Properties("Jet OLEDB:System database") = _
"C:\Program Files\Common Files\System\System.mdw"
cn.Open UserID:="Admin", Password:=""
''cn.Open

Dim cg As New ADOX.Catalog
''Set cg.ActiveConnection = CurrentProject.Connection
Set cg.ActiveConnection = cn

Dim ur As ADOX.User, gp As ADOX.Group, pp As ADOX.Property
For Each ur In cg.Users
Debug.Print "users = "; ur.Name
'- 0 = no permissions, the -number is a bitmap for a set of enumerations
'' Debug.Print "permissions = "; ur.GetPermissions("IDTable", adPermObjTable)
'' Debug.Print "property = "; cg.Users("jerry").Name
Next
For Each gp In cg.Groups
Debug.Print "groups = "; gp.Name
Next

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top