Automaticly changing linked tables

delboy2

Registered User.
Local time
Today, 16:06
Joined
Oct 10, 2003
Messages
12
Hi
I have a small issue with a database I have developed
The issue is that our servers in work are not known for there reliability
I have several backend databases linked in to frount end user databases all linked tables are currently linked to W: and all user databases are on the pc its self.
I also have a back up copy of all backend databases stored in drive S: which is a different server
What I would like to be able to do is create an auto relink if the server goes down
Is this something that is possible ?
Or would I be better of remapping the drives when this happens ?
 
I don't know whether remapping would be better or not, here's how to relink in DAO:

dim db as dao.database
dim tbl as tabledef
set db=currentdb
for each tbl in db.tabledefs
if tbl.connect <> "" then
tbl.connect = ";DATABASE=" & strdb (strb= the path and folder to your datbase)
tbl.refreshlink
end if
next

Be sure to add the Microsoft DAO 6.0, or earlier if appropriate, reference to your program.
 

Users who are viewing this thread

Back
Top Bottom