• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 811
  • Last Modified:

transfer the records from a passworded database

How to use the "INSERT INTO" but having a passworded source database that is the table from which I transfer the records is in a passworded database.
Thank you
0
marian68
Asked:
marian68
  • 4
  • 4
  • 2
1 Solution
 
peter57rCommented:
I guess you would use something like this...

INSERT INTO tblA
 SELECT *
FROM  [C:\database.mdb;PWD=mypass;].tblB;




0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Are you doing this from the Source database or Destination database?
0
 
marian68Author Commented:
It doesn't work. Access sees [C:\database.mdb;PWD=mypass;] like a path and doesn't recognize it.
Thank you
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
marian68Author Commented:
For LSM Consulting; I'm doing this from Destination database and the passworded database is the source database.
Thank you
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Try this:

INSERT INTO DestinationTable SELECT * FROM  SourceTable IN 'C:\database.mdb;PWD=mypass;'

Obviously your DestinationTable and SourceTable would have to be identical in terms of structure. If not, you'll have to define the columns.
0
 
peter57rCommented:
I take it you have modified the path and password to your own values?
0
 
marian68Author Commented:
for Peter57r: of course I modified the path. No problem when I transfer the data from the database with no password.
for LSMConsulting: Still access sees 'C:\database.mdb;PWD=mypass;'
like a path and I receive a message "can not find the path......"
Thank you
0
 
peter57rCommented:
Both versions should work.  So it sounds like a problem with the path string .


0
 
marian68Author Commented:
No problem with my path string.
I tried with another database without password and when I have the path 'C:\database.mdb;' Access doesn't recognize the path. After I delete the semicomma in the end of the path (;) Access has no problem in recognizing the path. Maybe instead of (;) I have to put another sign.
Thank you
0
 
peter57rCommented:
This is what I used to test the answer I posted..

INSERT INTO tbl_proid
SELECT *
FROM [L:\1Work\Databases\Database1.accdb;pwd=peter;].tbl_proid;
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 4
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now