By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,471 Members | 2,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,471 IT Pros & Developers. It's quick & easy.

Clone data...

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.