How to configure split database application to work on 2 networked

L

Lateral

Hi guys

Here is the scenario.

I have developed a small Access application and have split the databases to
that the data is seperate....so far so good.

I want to install the app on 2 PC's that are connected via a small
Workgroup. Let's call these PC's PC1 and PC2. I wanted to have the data
backend on PC1 and have PC2 map to the corresponding drive/folder on PC1. If
I map the drive from PC2 to PC1 as X: I can use the Linked Table Manager to
specify that the data backend is on X:. This is fine for PC2 but is I want to
use the same application for PC1 this is a problem as PC1 does not know
anything about X: as the data backend is stored "locally".

Each PC (PC1 and PC2) will be using the Access Runtime so therefore I can
not use the Linked Table Manager on each PC.

My understanding is that if I have used the Linked Table Manager to "tell"
the application where the data backend is ie: X: , then the application will
always look for the data backend on X:.

I am sure that there is a way around this issue and look forward to your
replies.

Thanks
Regards
Greg
 
D

Douglas J. Steele

Add your own code to the front-end database that relinks the front-end to
the tables in the back-end. You can get sample code at
http://www.mvps.org/access/tables/tbl0009.htm at "The Access Web".

Note that you can use UNCs (\\computer\share\folder\file.mdb) when linking,
rather than mapped drive letters (X:\folder\file.mdb). To do this, ensure
that you navigate to the back-end database through the Network Neighborhood,
rather than through the mapped drive letter.

You are, I hope, putting a copy of the front-end on PC2.
 
L

Lateral

Thanks Douglas

As I am a "newbie" can you provide me with more detail as to how this is
actually done?

Do I simply create a new "module" and copy the code into it and name it
"filedb" for example and then create a macro called "autoexec" and use the
OPENMODULE action and point it to the "FileDB" module?

Or is this all wrong!

Thanks for any help you can provide
Regards
Greg
 
L

Lateral

Oh,

I do not know if this matters or note, but the DB is to be run on Access 2000

Regards
Greg
 
D

Douglas J. Steele

Copy all of the code between Code Start and Code End into a module. You also
need to copy all of the code from http://www.mvps.org/access/api/api0001.htm
into another module. When you're saving the modules, make sure you do not
name the modules the same as any of the functions/subs within them.

In your AutoExec macro, you'd call the function fRefreshLinks()
 
L

Lateral

Hi Douglas

I got it working!!!!!

If you remember, the front end will be installed on each PC (PC1 and PC2)
with the backend DB being on the local drive of PC1.

Using the function/option that I have just implemented (fRefreshLinks()), I
have the following questions:

1. When PC1 and PC2 start the app, the prompt will be displayed regarding
"reconnecting etc". As I do not want this prompt to happen everytime the app
starts, I assume that I can simply make it a menu item on my SwitchBoard?

2. If the user decides to change the location of the backend DB, where does
Access store this information (eg: the registry of each PC)?

Thanks for your help.

Regards
Greg
 
L

Lateral

Hi Again Douglas

I have been doing some testing and it looks as thought the "reconnect"
prompt is always being displayed each time the app is started regardless of
whether or not the path containing the BE DB exists or not. I thought that
the prompt would only be displayed if the path did not exist?

Am I missing something?

Regards
Greg
 
L

Lateral

Hi Douglas

Is there a way to display the path containing the BE DB on a form so that I
can easily "see" that it is correct?

Regards
Greg
 
D

Douglas J. Steele

The code prompts whether or not you want to reconnect. If you say no, it
should end. Otherwise, yes, it's going to reconnect, even if it's to the
same location.
 
D

Douglas J. Steele

Look at the Connect property of the tables.

Assuming you've got a reference set to DAO (it won't be set by default in
Access 2000 or Access 2002), this is something like:

CurrentDb().TableDefs("NameOfMyTable").Connect
 

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