linking tables in runtime

  • Thread starter Thread starter Hugh N. Ross
  • Start date Start date
H

Hugh N. Ross

How can I control the linking of tables in a multi-machine Access Runtime
environment? I am developing an application that will be a frontend-backend
configuration with several front-end machines refering to the tables on the
back-end machine over a network. How do I enter the path to the back-end
machine in a runtiime client? Can the client machine discover the mame of
the back-end machine or must it be entered manually?

I have searched the knowledge base and have not found any answer.

I hope someone has some helpful information.

Thanks, Hugh
 
The general solution is to cobble together some code.

It really depends on your customer, and the application. For example, I have
one application where I can enter the new pathname into a form (it is a
table in the front end with one records). I also have a check box to
"re-link" One field is for my development pc, and the other field is for the
production version. If the check box is checked, then a re-link occurs at
start-up to the new path name. This works, since I already know the path
name and server name of this particular client. Thus, I can send updates via
email to them, and don't have to worry about re-linking.

Another way (which is even better) is to simply pop up the file browse
dialog and have the user browse to the back end mdb file. The majority of us
have thus cobbled code together from the two following pieces of code.

File open dialog:
http://www.mvps.org/access/api/api0001.htm

Relink Access tables from code
http://www.mvps.org/access/tables/tbl0009.htm

So, in effect, you actually will wind up writing your own linked table
manager. What you do with the above two routines is really up to you, but at
least they are already written for you. So, in a few hours of time you can
easily setup what you need, and what is even better, is that you can tailor
the above code to your particular needs.

I would also spend some time at the above mvp site, as there is a ton of
good stuff there.
 
Thanks for the quick response and links.
Unfortunately the application will be installed in many(hopefully) places by
nieve users. I will not know the machine name of the back-end. Possibly I
could force a specific name on the back-end machine. I don't think the
expected installers will know how to browse for the name.
I will check the links. Any further ideas you have would be welcome.
Hugh
 
You thus should use my 2nd suggestion (as mentioned, my first suggestion
works when you *know* the client, and the location). So, at start-up of the
front end, the user will be required to browse to the back end mdb file.

You certainly could during the install process grab the full pathname to
where he back end was installed, and then write out a small txt/ini file
with this location. Your front end code could then read this. However, I am
not into making install scripts, and they can be a huge amount of work.

Anyway, the about the best soltion is to simply at startup in your front end
is to have the user browse to the back end and select the mdb. Once done,
the user is home free.
 
Back
Top