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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer table from secured database into new database

Status
Not open for further replies.

WillemdeNie

Programmer
Sep 15, 2003
44
NL
I use the following code to retrieve data from a usrr level secured database:
Dim dbe As DAO.PrivDBEngine
Dim wrk As DAO.Workspace
Dim dbs As DAO.Database
Dim rst As DAO.Recordset

Set dbe = New PrivDBEngine
dbe.SystemDB = "C:\XXX.mdw"
dbe.DefaultUser = "Username"
dbe.DefaultPassword = "Password"
Set wrk = dbe.Workspaces(0)
' Open the secured database.
Set dbs = wrk.OpenDatabase("C:\YYYYY.mdb")


Set rst = dbs.OpenRecordset("Select * from Tbl_Leden")
So far it works!

What code should I use to append these records (the data from Tbl_Leden) to a table in the database from which this codes works (so not the secured one)

Willem
 
Use another recordset based on your local table and play with the .AddNew and .Update method

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top