Solved

Copy database

Posted on 1998-06-11
4
149 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 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