Establish which DB a table link is pointing at

S

Simon Morley

Is there a way programatically establishing which database
a linked table is pointing at? For example, I have a
front end that can point at a number of back end DBs
depending on what the user selects. But it would be nice
to establish whether the front end tblMain link is
currently pointing at "Back End A.mdb" or "Back End B.mdb"
so the user can check they are using the correct version
with actually running the change links script to update
them all. Any ideas?

Many thanks,

SCM
 
J

Jeff Boyce

Simon

Are you saying that there are multiple back-ends, all with the same data
structures? And that your users have to correctly pick which one?

If so, why? As in "what business need are you satisfying by having multiple
duplicate data bases?"
 
S

Simon Morley

Ideally, what I'm aiming at is having a Live and a Test
version of the BE. When the user logs on, they will be
able to select either one, the advantage being that if I
have just released some new code, they can select the Test
DB and manipulate records to there hearts content without
messing up any of the live data. As such, yes the
structures will be exactly the same.

However, to avoid any problems involving a user changing
lots of records in Live when they thought they were in
Test, I'd like to be able to establish which DB they are
logged on to and display this information on the menu or
in the status bar. Also, if a user logs on as normal,
it'd be nice to be able to show them that they are in live
without having to run all the delete links and then re-
attach links code ......
 
A

Armen Stein

Ideally, what I'm aiming at is having a Live and a Test
version of the BE. When the user logs on, they will be
able to select either one, the advantage being that if I
have just released some new code, they can select the Test
DB and manipulate records to there hearts content without
messing up any of the live data. As such, yes the
structures will be exactly the same.

However, to avoid any problems involving a user changing
lots of records in Live when they thought they were in
Test, I'd like to be able to establish which DB they are
logged on to and display this information on the menu or
in the status bar. Also, if a user logs on as normal,
it'd be nice to be able to show them that they are in live
without having to run all the delete links and then re-
attach links code ......

Hi Simon,

There are a number of relinking routines available on the Internet. We
have one that we use in all of our projects that we make available for a
nominal fee - contact me offline if you are interested.

To show the user which database they are linked to, we have a
configuration table in the back-end database that contains just one row
of configuration fields. One of them is the "user friendly" name of the
back-end database (e.g. "Production" or "Test"). We have code in all
our forms that set the Caption property of the form to concatenate this
name after the application name, like this: Order Tracking - Production

I hope this gives you some ideas,

--
Armen Stein
Access 2003 VBA Programmer's Reference
http://www.amazon.com/exec/obidos/ASIN/0764559036/jstreettech-20
J Street Technology, Inc.
Armen _@_ JStreetTech _._ com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top