Solved

Copy database

Posted on 1998-06-11
4
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

707 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