473,671 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Including password in import code

15 New Member
I import tables from one Access 2003 database into another 1x/day (for various reasons, linking tables does not meet the need). The database I am importing from is password protected at the general level so I am asked for a password with each table I import. Is there a way to include the password in the import code? My VBA import code is as follows:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferDatabase acImport, "Microsoft Access", _
  2.     "c:\Pdb.mdb", acTable, "Price", "PriceNew"
I've been looking through these and other forums for a couple of days to find a solution and either I'm not savvy enough to recognize the solution when I see it (sadly possible) or the answer is not as easy as I first thought it would be. Any ideas?
Mar 26 '08 #1
3 3975
PianoMan64
374 Recognized Expert Contributor
I import tables from one Access 2003 database into another 1x/day (for various reasons, linking tables does not meet the need). The database I am importing from is password protected at the general level so I am asked for a password with each table I import. Is there a way to include the password in the import code? My VBA import code is as follows:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferDatabase acImport, "Microsoft Access", _
  2.     "c:\Pdb.mdb", acTable, "Price", "PriceNew"
I've been looking through these and other forums for a couple of days to find a solution and either I'm not savvy enough to recognize the solution when I see it (sadly possible) or the answer is not as easy as I first thought it would be. Any ideas?
The TransferDatabas e function/macro doesn't support password protected databases.

If you know the password to the database, then you can open the database in DAO (Data Access Object) and give it the password to the database, and then run a query to import the table(s) that you need.

If you need to have code examples, let me know. Otherwise the best place to find out how to do it is the Microsoft Support SIte
Mar 29 '08 #2
RachH
15 New Member
Great! Thanks so much for your help.
Apr 1 '08 #3
brittany1
8 New Member
Hi, I have the same problem, Our server is too slow so
linking tables is not an option. I am therefor using a macro to importing several tables from a Access DB based on our server which is Password Protected. I have the password put have to enter it 6 times one for each table
can this be done with code. Please help.
Sep 16 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2817
by: Lewis Sellers | last post by:
I have a custom JSSESocketFactory class that can take a PKCS12 certificate and password and use it to talk through axis to a secure web service. That works.... The problem is it needs to work on a shared hosting environment where each customer will have thier own certificates, the certificate is used used to verify their identity. I've been staring at the JSSE but am at somewhat of a loss as how to pass the cert location/password TO the...
4
2674
by: Geir Baardsen | last post by:
Hi! 1. I wonder if there is a possibility to open a BackEnd.Db from the opening form, the form e.g.: frmOrders, in the FrontEnd.Db, when the BackEnd.Db is password protected? 2. Do I need to do this with all forms, or can I somehow have a refreshing links function that at the same time pass the password to the linked tables in the BackEnd.Db? The password is set only for opening the database itself, no grouping
0
3283
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others.
8
1619
by: Leszek | last post by:
Hi. Could you help solve the problem: i have a file that has two includes: //my script <?php include(.'/prog1.php'); include(.'/prog2.php'); ?>
9
6898
by: Arancaytar | last post by:
I have so far seen two methods for including external resources as CSS stylesheets in a document. The first is this: <link href="/stylesheets/style.css" rel="stylesheet" type="text/css" /> And the second is this: <style type="text/css"> @import "/stylesheets/style.css"; </style>
12
11079
by: =?Utf-8?B?am9uaWdy?= | last post by:
I wrote a simple VB.NET application that imports and edits CSV files. Now I’d like to “lock” the raw (pre-import) CSV files so these cannot be opened separately. It is not high-sensitive data, I just don’t want folks to peek in the files. So time-consuming encryption is not necessary, just a simple password-to-open that I can program in my application so it internally opens the imported CSV file would be perfect, but I can’t...
2
10018
by: Gil_H | last post by:
Hi, I'm trying to run a script over unix on a remote machine. In order to automate it, the procedure requests the following: 1. Using SSH connection. 2. Operating a command on the remote machine. 3. Expecting password or (yes/no) request and authorize it. I get an error (I thing that it occures at the last part (3) of the password request).
16
8372
by: Greg (codepug | last post by:
If one converts that .mdb into an .mde the code is secure but the tables can still be imported. Just for Very Basic protection, I have placed a Password on the database using the "Set Database Password" option. Now it requires that the password be entered each time you start the database. How do I enter the Password using code, so that the database starts up without having to type it in ??? I notice that there is a way in code to set...
6
7027
by: cnivas | last post by:
Hai All, Good Evening, I'm doing a small application using python and MySQL in APPLE MACINTOSH OPERATING SYSTEM. I want to to store the password in encrypted form in the database. While retriving the password it should check the encrypted text with the plain text and it should navigate to the other form. I have done the encrypted form, but while checking the parameters it should not check the plain text with the encrypted text. It only...
0
8909
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8596
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4221
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.