?
Solved

transfer the records from a passworded database

Posted on 2011-02-15
10
Medium Priority
?
801 Views
Last Modified: 2012-05-11
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
Comment
Question by:marian68
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 34899124
I guess you would use something like this...

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




0
 
LVL 85
ID: 34900094
Are you doing this from the Source database or Destination database?
0
 

Author Comment

by:marian68
ID: 34900825
It doesn't work. Access sees [C:\database.mdb;PWD=mypass;] like a path and doesn't recognize it.
Thank you
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:marian68
ID: 34900842
For LSM Consulting; I'm doing this from Destination database and the passworded database is the source database.
Thank you
0
 
LVL 85
ID: 34902796
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
 
LVL 77

Expert Comment

by:peter57r
ID: 34904487
I take it you have modified the path and password to your own values?
0
 

Author Comment

by:marian68
ID: 34909770
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
 
LVL 77

Expert Comment

by:peter57r
ID: 34914027
Both versions should work.  So it sounds like a problem with the path string .


0
 

Author Comment

by:marian68
ID: 34915718
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
 
LVL 77

Accepted Solution

by:
peter57r earned 1000 total points
ID: 34916697
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question