Unlink and Relink

  • Thread starter Thread starter Kaykayme
  • Start date Start date
K

Kaykayme

I have Access 2007 on WindowsXP system. I have a main database with several
other databases linked to it. Because I am still addressing some issues or
adding new features, when I do this type of construction on the main database
it locks the other users out from using the linked tables in the other
databases. My solution is to programmatically copy the database file to a
temporary folder, unlink the linked tables. Once the revisions have been
made I want to relink the tables and upload the revised database back to the
server and delete from temp folder. I have created a database with a
switchboard to open all the databases and clicking on the database button
should perform this operation. There are a lot of articles on linking and
relinking, what about unlinking. Thanks for any help.
 
If you relink the tables to a new db, the said tables would be automatically
unlinked from the first db, right? If that doesn't work, then local tables
have a ZLS connect string, so maybe you could set the string to ""?

Tabledefs("YourTable").Connect = ""
Tabledefs("YourTable").RefreshLinks

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Thank you so much. This seems like an easier solution that I came up with.
The issue is Database 1 is the main database and Database 2 and 3 both have
tables linked to Database 1. When I want to revise Database 1, 2 or 3 I came
up with opening the Database 2 and 3 after it has been copied to another
location, deleting the linked tables and importing the table again as not
linked in the copies of the databases. With Database 1 I just copy the
database to another location. Then relink the tables on close. This will be
helpful.
 
Back
Top