Relinking FE to 2 BE

geoffcodd

Registered User.
Local time
Today, 10:38
Joined
Aug 25, 2002
Messages
87
I have a front end which is connected to 2 BE

G:\E&S\Energy\em\em.mdb
G:\E&S\Energy\em\em_data.mdb

the first BE is an A97 db which is actually where all the data is stored for a VB App

the second BE is an A2K db where additional data is stored

I currently have code which I am uble to use to relink to the first BE at start up, the problem I am having is working out the code for linking to the 2 differnt BE

Any help is greatly appreciated

Thanks
Geoff
 
The easiest way (I think) is to have a table of table names with a code for the back end that you can store in a lookup table. You could then use the looping recordset to interrogate the 'table table' (if you get what I mean) and obtain the correct back end path and relink from that.

ie

tblTableNames
-------------------
TableName
BE_Code

tblBackends
----------------
BE_Code
BE_Location

any help?
 
In a similar situation I use error trapping, e.g. attempt to link all tables to the first BE. If it gives an error then link to the second BE. This approach has served me well with upto 4 BEs.
Hope it helps.
 
Thanks everyone for all your help, I have now sorted it

Thanks
Geoff
 
Thanks for that Pat, I have it working fine, the only thing I would like to change is that if there are bad links I would rather specify the file location in code rather that the user trying to find them

the 2 BE will always be located at

G:\E&S\Energy\em\EM_UoM_ENData.mdb
G:\E&S\Energy\em\EM.mdb

is there a way to alter the code to do this

Thanks
Geoff
 

Users who are viewing this thread

Back
Top Bottom