Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Location
    Melbourne, Australia
    Posts
    201

    Unanswered: Clearing Backend Links

    Hello again, Colleagues All,
    I am working on a database where the client's database files are on a server which is identified on the networked PCs as a disk drive and the front-end applications nominate this disk as the location of the backend database. On my home system, the drive which has the same alphabetic ID is used for other purposes. When I download or upload the applications to work on them, I have the tedious task of deleting each link by hand and then using the New table/Link facility to attach the frontend to my own copy of the backend.

    The code in the client's front end does include code to refresh the links by looking in the nominated disk drive, but what I would like to have is some code that would simply remove all of the links in the Link Manager database in one hit and possibly replace them with the links to my copy of the backend database.

    Is this feasible and has anybody got some VBA code which would do the job ?

  2. #2
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    The attached database which I found a couple of years ago on a website.
    may suit your requirements.

    I use a form called frmRelink that is displayed when user clicks a menu item or a certain location on a splash screen. The code checks that the tables exist in the location as per table manager (system tables). If the table does not exist then the user is prompt to select the correct location. If a table is found then the process continues when all tables are linked then a message is displayed.

    It can be time consuming if you have more than one linked back end as you have to remember where the tables are located.
    Attached Files Attached Files

  3. #3
    Join Date
    Oct 2004
    Location
    Melbourne, Australia
    Posts
    201
    Thanks for that, Poppa Smurf. It sounds a bit like what I have already seen in my clients database. In that code, the program tries to relink using the pathname in the system tables. If that does not work, it looks for a database in the current directory and finally the subdirectory .\data. The background to this is that the software was written for a community of separate businesses whose databases were on different servers in different cities, but the data was picked up from a common call centre. my variation would be to nominate the path to the database in the startup routine which would be specific to the client PC and it would check the links for the relevant database. All I needed to do therefore was to edit the path before moving the application back up to the client system from my own.
    My main reason for posting this inquiry was that my process was more fundamental in that it actually deleted then created links to a database known to be different and I was unsure whether the system functions I already knew about would work without damaging anything, or whether there were other library routines which would be more secure, or indeed whether there were any nasty traps I should be aware of. (I have had some nasty experiences in upgrading Access 97 to 2000 and 2003, for instance).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •