Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

OpenDatabase for Access database with password

 
   Database Forums (Home) -> Visual Basic -> DAO RSS
Next:  Which mailing script do you recomend?  
Author Message
Peter Karlström

External


Since: Aug 07, 2006
Posts: 2



(Msg. 1) Posted: Thu May 24, 2007 6:27 am
Post subject: OpenDatabase for Access database with password
Archived from groups: microsoft>public>vb>database>dao (more info?)

Hi

How do I use DAO to open an Access (2002) database which has a password?

The goal is to copy tables (with structure and data) from one Access
database to another.
So any other solution is appreciated.

Thanks in advance

--
Peter Karlström
Midrange AB
Sweden

 >> Stay informed about: OpenDatabase for Access database with password 
Back to top
Login to vote
Paul Clement

External


Since: Sep 02, 2003
Posts: 526



(Msg. 2) Posted: Thu May 24, 2007 12:33 pm
Post subject: Re: OpenDatabase for Access database with password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 24 May 2007 06:27:00 -0700, Peter Karlström
wrote:

¤ Hi
¤
¤ How do I use DAO to open an Access (2002) database which has a password?
¤
¤ The goal is to copy tables (with structure and data) from one Access
¤ database to another.
¤ So any other solution is appreciated.

If you open the source database you can copy to a destination database using something like the
following (assumes existing database and table):

INSERT INTO [MS Access;DATABASE=c:\Test Files\db1.mdb;PWD=password].[Data] SELECT * FROM [Data]

You can build the structure at the same time as you export the data using something like:

SELECT * INTO ... FROM ...

The above method will not generate the primary key or any indexes so you will have to add those
using extra DAO code.


Paul
~~~~
Microsoft MVP (Visual Basic)

 >> Stay informed about: OpenDatabase for Access database with password 
Back to top
Login to vote
Peter Karlström

External


Since: Aug 07, 2006
Posts: 2



(Msg. 3) Posted: Thu May 24, 2007 1:56 pm
Post subject: Re: OpenDatabase for Access database with password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Paul

This was exactly the solution I wanted!

Thanks a million

Regards
--
Peter Karlström
Midrange AB
Sweden


"Paul Clement" wrote:

> On Thu, 24 May 2007 06:27:00 -0700, Peter Karlström
> wrote:
>
> ¤ Hi
> ¤
> ¤ How do I use DAO to open an Access (2002) database which has a password?
> ¤
> ¤ The goal is to copy tables (with structure and data) from one Access
> ¤ database to another.
> ¤ So any other solution is appreciated.
>
> If you open the source database you can copy to a destination database using something like the
> following (assumes existing database and table):
>
> INSERT INTO [MS Access;DATABASE=c:\Test Files\db1.mdb;PWD=password].[Data] SELECT * FROM [Data]
>
> You can build the structure at the same time as you export the data using something like:
>
> SELECT * INTO ... FROM ...
>
> The above method will not generate the primary key or any indexes so you will have to add those
> using extra DAO code.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>
 >> Stay informed about: OpenDatabase for Access database with password 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
my First database - DAO and Access database - VB6 - All the examples that I have used deal with a single form for everything. I have multiple forms and am not sure what I am doing is the correct way. Although I have a couple of areas (forms) that are questionable, this post deals with one form, my..

how to create an Access XP/2003 database - hi, How can I select the version(compatibilty) for my database I Use: Set db_Temp = WrkSpace.CreateDatabase(MF, dbLangDutch, dbVersion40) 'office 2000 no problem. but when I select Set db_Temp = WrkSpace.CreateDatabase(MF, dbLangDutch,..

Can't open Access database from VB 4 - I'm using VB 4.0 and DAO 3.51 and am trying to use a database created with Access 2000. When I try to open the database I get the error 'Run-time error 3343' unrecognized database format The filename I'm using is correct and is a valid Access database.....

Error using DAO access an Access 97 database - URGENT - My VB6.0 app suddenly has problem accessing an Access97 database. The error is "Method or data member not found!" I even reinstalled VB 6.0 but still didn't help! Any help is greatly appreciated! Thanks Bill

Database Access Crashes on Windows 2003 Terminal Server - I have been running a Microsoft Access 97 application on Windows 2003 Terminal Server for almost a year now, with no problems. About two weeks ago, I started to get the following errors in my event log: Application Error; EventID: 1000 Faulting..
   Database Forums (Home) -> Visual Basic -> DAO All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]