Solved

Copy database

Posted on 1998-06-11
4
146 Views
Last Modified: 2010-05-03
How to create new access database, and put in it records from Data Control recordset (backup of database). Shall you give my full procedure (with comments).
0
Comment
Question by:beciakk
4 Comments
 
LVL 7

Expert Comment

by:kamall
ID: 1463158
Since you intend to make a backup copy of the database, then the simplest and fastest way is to use the FileCopy statement:
FileCopy SourceFile, DestinationFile
Both SourceFile and DestinationFile are the full path/filename of the source and destination files.
Make sure that the database is closed before copying it.
Regards
0
 

Expert Comment

by:susmita
ID: 1463159
Since you want to backup you must be having a data control for the existing databse, make this into a control array. ie. if the name of the datacontrol is DataControl1,make the index propertity as 0 and use the following code

Load DataControl1(1)
and set the required properties like the connection,databse etc.
Hope this helps

0
 

Author Comment

by:beciakk
ID: 1463160
kamall:
You forget, that the database file is opened by Data Control and I can't close it and open (maybe you can help :-).

susmita:
So good, so far, but I don't know how to do it (Help me)

Thank you
0
 
LVL 2

Accepted Solution

by:
richtsteig earned 50 total points
ID: 1463161
Use the CreateDatabase method
to create a new database and then
run the

SELECT
INTO <newtable>
IN 'your new database'
FROM <oldtable>

statement in your original!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

760 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