Broken links due to server name changes........

Broken links due to server name changes........

Post by SiBIb3Rja » Wed, 19 Oct 2005 23:07:03


Hi there

we will soon be moving our file servers and renaming them, as well as
changing user drive mappings in our domain. as a result any links in files
(including macros, linked tables etc) referring to other files
elsewhere, will break (note that SQL look-ups/ links wont break). is there
any way/ software that people know of that
can scan for and report.... maybe help fix too, these broken links?

Many thanks for any help.
 
 
 

Broken links due to server name changes........

Post by S2xhdHV » Thu, 20 Oct 2005 00:53:03

All you really need to do is to use the Linked Table Manager (Tools->Database
Utilities->Linked Table Manager) and relink your tables to the new server
name. I notice you mentioin macros, but are you referencing macros in the
back end database?
You can write or possibly find with a Google search, code that does the
relink. It is faster to do it that way.

 
 
 

Broken links due to server name changes........

Post by SiBIb3Rja » Thu, 20 Oct 2005 00:57:22

Thanks for the imput Klatuu, the only problem is that there are hundreds of
files, and many of them contain hundreds of linked tables....... a hugly time
consuming process to do this manually.

many thanks
 
 
 

Broken links due to server name changes........

Post by S2xhdHV » Thu, 20 Oct 2005 02:51:03

Okay, I have a relink routine somewhere in my bag of tricks. I'm in the
middle of something at the moment. Later today I can post back with it.
 
 
 

Broken links due to server name changes........

Post by S2xhdHV » Sat, 22 Oct 2005 05:09:05

My apologies for taking so long to get back, but I did find it:

Private Function ReLink(strNewPath As String) As Boolean
Dim dbs As Database
Dim tdf As TableDef
Dim intCount As Integer
Dim frmCurrentForm As Form

DoCmd.Hourglass True
On Error GoTo ErrLinkUpExit
Me.lblMsg.Visible = True
Me.cmdOK.Enabled = False

Set dbs = CurrentDb

For intCount = 0 To dbs.TableDefs.Count - 1
Set tdf = dbs.TableDefs(intCount)
If tdf.Connect <> "" Then
Me.lblMsg.Caption = "Refreshing " & tdf.NAME
DoEvents
tdf.Connect = ";DATABASE=" & strNewPath
tdf.RefreshLink
End If ' tdf.Connect <> ""
Next intCount