Results 1 to 7 of 7
  1. #1
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451

    why use relinking code with a text file

    i have some code for relinking my FE to the BE after each deployment and so far its working but could be better. Honestly the code itself if probably great but since I'm still learning, i think most of my issue is that i understand the overview of how its working but don't fully understand it enough that i could recreate myself using the methods(if that makes sense). While looking around the internet at some of the different relinking codes and the methods they are using trying to better understand it i came across a fairly new site for access vba at http://accessjitsu.com/ and he has a section and videos for his relinking code explaining what's happening and why (great site by the way). in his code he is using a text file sitting beside the FE to store new file path. I'm kind of Leary of this as I've never done that and my users could possible see and alter this text file. so my question is, since I've seen several relinking codes that do this, why? what is the advantage of storing this path in an external text file versus in a table on the FE? i already have a "default" table that i store different variables in for different queries or loading. would storing this path there be better?

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    I myself no longer wrestle with this type issue. The path to the BE is stored in the FE. In a correctly designed network all users will have the same drive mapping. Thus one links 1 FE only - and the in duplicating/deploying of FEs - everyone's linking is valid.

  3. #3
    essaytee's Avatar
    essaytee is offline Been around a while
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2008
    Location
    Melbourne, Australia
    Posts
    27
    Quote Originally Posted by NTC View Post
    I myself no longer wrestle with this type issue. The path to the BE is stored in the FE. In a correctly designed network all users will have the same drive mapping. Thus one links 1 FE only - and the in duplicating/deploying of FEs - everyone's linking is valid.
    Drive mappings can be all over the shop (where I work, they are) and for this reason I work solely with the server name address to link back-end files. The users are in and out of different back-end files, day in, day out.

  4. #4
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    With Universal Naming Convention (UNC) or server name (if not drive mapping) at any PC the key point is one should have a uniform path to the same place. i.e. \\computername\sharename\path\filename

    It is a shame that this uniformity does not also extend to drive mapping but I can understand sometimes end users do their own thing. But it doesn't change the point that with the server name path that the path is stored into the FE - so that one links the first and then all others that duplicate the FE will work. You really should strive to make this your deployment reality - any attempt to do otherwise via coding is spending time & money in going the wrong direction fundamentally.

    However your comment that "users are in and out of different back-end files, day in, day out" is disturbing. This is definitely not recommended at all. All users should only be using their own FE - and only a developer/admin should ever be in a BE directly and under controlled situations. You do risk corruption otherwise.

  5. #5
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    What's the benefit to using a text file for linking? I can't think of any. Why would someone do it that way? It sounds like it was his solution to a problem with drive mapping. Like others have said, if you use the UNC the drive letter won't make any difference. Maybe he doesn't have a way to update his users quickly and he suspects the location of the backend to be replaced soon.... Could be a million reasons to justify why he did it.

    Just keep it in the code and you'll be fine.

  6. #6
    essaytee's Avatar
    essaytee is offline Been around a while
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2008
    Location
    Melbourne, Australia
    Posts
    27
    Quote Originally Posted by NTC View Post

    ...snip...

    However your comment that "users are in and out of different back-end files, day in, day out" is disturbing. This is definitely not recommended at all. All users should only be using their own FE - and only a developer/admin should ever be in a BE directly and under controlled situations. You do risk corruption otherwise.
    I'm disturbed that you're disturbed; my intention was not to cause you any grief in any way. You made an assumption, and I can assure you that you are off the mark.

    Back to the issue, I agree with others that the linking code can remain in the FE. My experience is that working with UNC as opposed to drive mappings makes life easier.

  7. #7
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    Thank you all, especially the comments related to my text file issue. I don't see any benefit to using the text file myself but had to ask the question mainly because several of the sample codes i have found, maybe half, have used this method. I wanted to make sure that there was not a situation or reason that i was not aware of. i have reworked the code to use a default storage location on the FE rather than in the text file for the file path.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Code/function needed delete an external text file
    By Chris033115 in forum Programming
    Replies: 6
    Last Post: 03-31-2015, 02:09 PM
  2. Replies: 9
    Last Post: 08-19-2013, 01:08 PM
  3. Replies: 12
    Last Post: 04-30-2013, 02:41 AM
  4. Replies: 3
    Last Post: 02-22-2013, 06:41 AM
  5. Relinking an ADE file to SQL tables
    By cjbuechler in forum Database Design
    Replies: 4
    Last Post: 06-05-2009, 09:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums