Copying a database without retaining links to the original file (1 Viewer)

tony1892

New member
Local time
Today, 06:50
Joined
Feb 6, 2009
Messages
2
I am brand new to access and I've been asked to look at a database.

My problem is that when I copy it from a networked area to my hard drive the links between the 2 are retained. I only discovered this after deleteting 100k+ records....!

It's likely that I've created a shortcut to the original but all the obvious checks suggest that I havent (database properties give the location of c:\) and it also took several minutes to copy the database from the networked drive to my c:\ drive.

I know they are linked not only because the 2 files update no matter which drive I modify, but also because if I unplug my LAN connection I can't open the database from my c:\ - it gives an 'object variable or with block variable not set' error.

This is probably something very simple but like I say I've never used access in anything other than a user capacity up until now. All help gratefully received.
 

Dennisk

AWF VIP
Local time
Today, 13:50
Joined
Jul 22, 2004
Messages
1,649
you need to copy both frontend and backend to a seperate development area. Then re-link the tables from the fdevelopment rontend to the development backend.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:50
Joined
Sep 12, 2006
Messages
15,614
what happens is that the front end effectively stores the connection path to the back end (actually each table vcarries its own connection information)

moving or copying the front end, just copies the same connection path - so if the network path is valid on the new machine/folder, the app will run without problem.

this is good in some respects - eg, if you reissue a database with added functionality, you can connect it to the backend, and then distribute - without the users needing to relink the files.

however, if you dont realise this will happen, you could inadvertently delete stuff you really do need
 

tony1892

New member
Local time
Today, 06:50
Joined
Feb 6, 2009
Messages
2
Thanks a lot for the replies, I'll see if I can work out how to relink to the dev area. Much appreciated!
 

Dennisk

AWF VIP
Local time
Today, 13:50
Joined
Jul 22, 2004
Messages
1,649
Access comes with a link table manager, found on the tools menu.
 

sandy22

New member
Local time
Today, 09:50
Joined
May 20, 2020
Messages
10
Hi, I have been asked to look at a database and am not very much experienced with Access. I am facing the same issue. I copied a database to desktop and made changes which have been reflected on the original database in the drive. I see the solution offered is to re link front end and back end tables. How do I know which is the front end/back end table? Should I move all linked tables to desktop ? Any help is appreciated. Thank You
 

Micron

AWF VIP
Local time
Today, 09:50
Joined
Oct 20, 2018
Messages
3,476
Not clear if your db is split or not. If it is, you needed to copy 2 files, not one and you make it sound like it is one.
If it is split, the fe would have mostly/exclusively links to tables in the other file, which are identified by a different table icon in the navigation pane. If you mouse over them, you should see a popup bubble showing you the path to those tables. If you see neither, then I guess it isn't split. Also possible that it really isn't split in the normal sense but has 1 or 2 linked tables from something like a library db, but I suspect not.

I never know whether to suggest that someone start their own thread or not when they tack on to one that is old like this one.
 

sandy22

New member
Local time
Today, 09:50
Joined
May 20, 2020
Messages
10
Thank you so much for replying. The database is not split but a few tables in it are linked to 2 other databases. I can see the path to it as well. Any suggestions on how I can proceed to make changes without affecting the original dB?
 

Micron

AWF VIP
Local time
Today, 09:50
Joined
Oct 20, 2018
Messages
3,476
Which is the "original" db? Changes such as what, code? Form design? Data?
Maybe all you need to do is delete the linked tables if you're talking about editing data (this will not delete the tables because they don't actually exist in the db with the links). If you copy a db and in that copy you modify data and tables holding that data are linked, you will affect the data in the linked tables if there is a valid connection. I would play with a copy of any db in case you find that forms/reports and such don't work anymore. Furthermore, if you copy both the fe and a db that it links to, move them to another folder and don't edit the links, then.... see red above.
 

sandy22

New member
Local time
Today, 09:50
Joined
May 20, 2020
Messages
10
Relinking the tables did the work. Now I can edit without affecting the FE db. Thanks for your help.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:50
Joined
Feb 19, 2002
Messages
42,981
Stop. Has anyone updated data in the original database since you made the copy? If they have, you will loose their data changes if you put your copy back on the server.

All shared databases should be split into a Front End (FE - forms/reports/macros/queries/code) and a Back End (BE - tables ONLY). The FE links to the BE tables so the FE contains only program elements and the BE contains only data. This allows you to copy the FE to your local drive for modification. You also need to copy the BE and relink YOUR copy of the FE to YOUR copy of the BE so you won't accidentally make any changes to production data while you are testing your changes.

When you have made the required changes and tested them, you can put the new FE back and relink it to the production FE. You would then notify people to close their copy of the FE and open the new one.

This works only when you have a distribution process that copies the production FE to each user's local drive every time there is a new version. You can find instructions on how to do this or post back if you need clarification. Just be certain you do not overlay any updated data with your new version until you get control of the versioning process.
 

Users who are viewing this thread

Top Bottom