473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Clone data...

I have a situation where a user needs to clone an existing BE database
(stored on a server) to his local machine. Assume the followings...
User goes into the database FE which has linked BE. BE is stroed on a
server.
User needs to be able to click a button on the FE that will clone the
copy of the BE on the server to C:\.
If a copy of the BE already exists at C:\, the clone process should
overwrite the existing copy at C:\.

I THINK this should be easy, but the pain killers I am taking for this
ruptured disc in my back has me a tad loopy (loopier than normal?)
right about now. Any guidance (other than 'don't code while takling
pain killers') is appreciated...

DB

Jul 18 '07 #1
5 1852
Look at the Dir function in the Help file for checking if a copy of the BE
already exists at C:\. Look at the FileCopy statement to create a clone.

The FE will still be linked to the BE on the server. If you want to relink
to the clone, look at TableDefs and Connection String in the Help file.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com

"DavidB" <je***@yahoo.comwrote in message
news:11**********************@z28g2000prd.googlegr oups.com...
>I have a situation where a user needs to clone an existing BE database
(stored on a server) to his local machine. Assume the followings...
User goes into the database FE which has linked BE. BE is stroed on a
server.
User needs to be able to click a button on the FE that will clone the
copy of the BE on the server to C:\.
If a copy of the BE already exists at C:\, the clone process should
overwrite the existing copy at C:\.

I THINK this should be easy, but the pain killers I am taking for this
ruptured disc in my back has me a tad loopy (loopier than normal?)
right about now. Any guidance (other than 'don't code while takling
pain killers') is appreciated...

DB

Jul 18 '07 #2
Thank you. Exactly the type and level of assistance I was looking
for. I'll jump into the help files and get the code written up to
accomplish the task...
On Jul 18, 3:54 pm, "Steve" <So...@private.emailaddresswrote:
Look at the Dir function in the Help file for checking if a copy of the BE
already exists at C:\. Look at the FileCopy statement to create a clone.

The FE will still be linked to the BE on the server. If you want to relink
to the clone, look at TableDefs and Connection String in the Help file.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com

"DavidB" <je...@yahoo.comwrote in message

news:11**********************@z28g2000prd.googlegr oups.com...
I have a situation where a user needs to clone an existing BE database
(stored on a server) to his local machine. Assume the followings...
User goes into the database FE which has linked BE. BE is stroed on a
server.
User needs to be able to click a button on the FE that will clone the
copy of the BE on the server to C:\.
If a copy of the BE already exists at C:\, the clone process should
overwrite the existing copy at C:\.
I THINK this should be easy, but the pain killers I am taking for this
ruptured disc in my back has me a tad loopy (loopier than normal?)
right about now. Any guidance (other than 'don't code while takling
pain killers') is appreciated...
DB- Hide quoted text -

- Show quoted text -

Jul 20 '07 #3
When I use FileCopy in an attempt to make a copy of the BE onto the
local machine I get an Access Denied error. It looks as if the BE
cant be copied since the FE that is attempting the copy uses that very
same back end. Since copying a file that is open at the time can lead
to all kinds of nasty gremlins, this is not at all surprising. I can
however already have a copy of the BE (w/o data) on the local machine
and then merely populate the tables in the 'clone' from the data in
the 'live' BE via queries.
On Jul 20, 12:01 pm, DavidB <je...@yahoo.comwrote:
Thank you. Exactly the type and level of assistance I was looking
for. I'll jump into the help files and get the code written up to
accomplish the task...

On Jul 18, 3:54 pm, "Steve" <So...@private.emailaddresswrote:
Look at the Dir function in the Help file for checking if a copy of the BE
already exists at C:\. Look at the FileCopy statement to create a clone.
The FE will still be linked to the BE on the server. If you want to relink
to the clone, look at TableDefs and Connection String in the Help file.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com
"DavidB" <je...@yahoo.comwrote in message
news:11**********************@z28g2000prd.googlegr oups.com...
>I have a situation where a user needs to clone an existing BE database
(stored on a server) to his local machine. Assume the followings...
User goes into the database FE which has linked BE. BE is stroed on a
server.
User needs to be able to click a button on the FE that will clone the
copy of the BE on the server to C:\.
If a copy of the BE already exists at C:\, the clone process should
overwrite the existing copy at C:\.
I THINK this should be easy, but the pain killers I am taking for this
ruptured disc in my back has me a tad loopy (loopier than normal?)
right about now. Any guidance (other than 'don't code while takling
pain killers') is appreciated...
DB- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -

Jul 20 '07 #4
Programatically create an mdb file in the folder where you want the copy of
the backend then use the TransferDatabase method to import all the tables in
your backend to the new file.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com


"DavidB" <je***@yahoo.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
When I use FileCopy in an attempt to make a copy of the BE onto the
local machine I get an Access Denied error. It looks as if the BE
cant be copied since the FE that is attempting the copy uses that very
same back end. Since copying a file that is open at the time can lead
to all kinds of nasty gremlins, this is not at all surprising. I can
however already have a copy of the BE (w/o data) on the local machine
and then merely populate the tables in the 'clone' from the data in
the 'live' BE via queries.
On Jul 20, 12:01 pm, DavidB <je...@yahoo.comwrote:
>Thank you. Exactly the type and level of assistance I was looking
for. I'll jump into the help files and get the code written up to
accomplish the task...

On Jul 18, 3:54 pm, "Steve" <So...@private.emailaddresswrote:
Look at the Dir function in the Help file for checking if a copy of the
BE
already exists at C:\. Look at the FileCopy statement to create a
clone.
The FE will still be linked to the BE on the server. If you want to
relink
to the clone, look at TableDefs and Connection String in the Help file.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@pcdatasheet.com
"DavidB" <je...@yahoo.comwrote in message
>news:11**********************@z28g2000prd.googleg roups.com...
>I have a situation where a user needs to clone an existing BE database
(stored on a server) to his local machine. Assume the followings...
User goes into the database FE which has linked BE. BE is stroed on
a
server.
User needs to be able to click a button on the FE that will clone the
copy of the BE on the server to C:\.
If a copy of the BE already exists at C:\, the clone process should
overwrite the existing copy at C:\.
I THINK this should be easy, but the pain killers I am taking for
this
ruptured disc in my back has me a tad loopy (loopier than normal?)
right about now. Any guidance (other than 'don't code while takling
pain killers') is appreciated...
DB- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -


Jul 20 '07 #5
DavidB <je***@yahoo.comwrote:
>When I use FileCopy in an attempt to make a copy of the BE onto the
local machine I get an Access Denied error. It looks as if the BE
cant be copied since the FE that is attempting the copy uses that very
same back end.
You need to close all forms and recordsets (and unlikely but reports too) which are
bound to the backend. You likely have a form which is open agains the backend for
performance purposes.

You can verify that all such are closed when there is no longer an .ldb file against
the backend.
>I can
however already have a copy of the BE (w/o data) on the local machine
and then merely populate the tables in the 'clone' from the data in
the 'live' BE via queries.
You could but you'd have to do this in relational sequence. That is parent tables
first, then child tables and child of child tables. If that makes sense.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jul 21 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Vincent | last post by:
Hey, I have a problem to understand the underlaying of clone method. Hope someone can help me out. Let's say, clonedObject = originalObject.clone() (syntax may be wrong, but you know what I...
4
by: Steve Teeples | last post by:
I have TreeNodes in a TreeView, each contains unique data in its Tag section. I am trying to 'clone' a TreeNode and then modify the tag data of the cloned TreeNode. What I am seeing is that by...
4
by: Vincent | last post by:
Hey, I have a problem to understand the underlaying of clone method. Hope someone can help me out. Let's say, clonedObject = originalObject.clone() (syntax may be wrong, but you know what I...
7
by: =?Utf-8?B?Sm9lbCBNZXJr?= | last post by:
I have created a custom class with both value type members and reference type members. I then have another custom class which inherits from a generic list of my first class. This custom listneeds...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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...

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.