Solved

transfer the records from a passworded database

Posted on 2011-02-15
10
748 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
  • 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 84
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
 

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 84
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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 250 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now