473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

link to database file

i have split my database and created a code that will look up for the
location of the mdb back end everytime the front end link has change.
i'm wondering if there is a way to just create and INI file to store
the location of database backend. 'cause it's very time consuming
sometimes when u change the front end (i.e. the query, forms, reports,
etc) from other computer and when u update the mdb files from other
machine it will look up again the location of database file.

thanks in advance
Nov 13 '05 #1
2 2115
Even if you use an INI file, you will still have to set the Connect property
of each linked TableDef if it is different from that used previously.

There is a way to speed up this process though. Open a connection to the
back end before you run your relink code, and release it afterwards. You do
not actually use the database variable; its function is simply to keep the
link open so Access does not have to reopen the connection for each table.

Dim dbBE As DAO.Database
Dim strPath as String

strPath ="C:\MyPath\MyFile.mdb"
Set dbBE = OpenDatabase(strPath)

'Insert your relinking code here

dbBE.Close
Set dbBe = Nothing

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jaYPee" <hi******@yahoo.com> wrote in message
news:id********************************@4ax.com...
i have split my database and created a code that will look up for the
location of the mdb back end everytime the front end link has change.
i'm wondering if there is a way to just create and INI file to store
the location of database backend. 'cause it's very time consuming
sometimes when u change the front end (i.e. the query, forms, reports,
etc) from other computer and when u update the mdb files from other
machine it will look up again the location of database file.

thanks in advance

Nov 13 '05 #2
jaYPee wrote:
i have split my database and created a code that will look up for the
location of the mdb back end everytime the front end link has change.
i'm wondering if there is a way to just create and INI file to store
the location of database backend. 'cause it's very time consuming
sometimes when u change the front end (i.e. the query, forms, reports,
etc) from other computer and when u update the mdb files from other
machine it will look up again the location of database file.

thanks in advance

Simple, relink the frontend on one machine, then copy it to the other
machines. The link will not need updating on the other machines if you
use the same network share.

I've done something very "tricky" but messy... (had to solve having the
workgroup security file with the backend on a network share which may be
different at different client sites).

Using InstallShieldExpress
- during installation nstallShield prompts for the "data location"
- take this folder value and build it into the shortcuts InstallShield
will create for me
- In this shortcut I...
1) use the folder as value for the /cmd argument so it is passed to my
program.
2) use the folder as part of the path to my workgroup file
- when front-end opens it first checks this /cmd argument and attempts
to find and link to the database there and links automatically

Only problem I have is the shortcut can get too long if your path to
your back-end is really long.

Has anyone else come up with a solution to automate as much as possible
the use of Workgroup security and re-linking to a backend data file?
--
regards,

Bradley
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: L Mehl | last post by:
Hello -- I am using Enterprise Architect, a UML modeling tool, which is built on a pre-Access 2000 mdb. The database describing the model has the extension ".eap". I want to build some...
6
by: KathyK | last post by:
Hi and Thanks in advance! I am able to link to a MSAccess 2000 db that I secured. I have removed all permissions from the Admin user and actually the whole users group and admins group. I...
1
by: Andrew Chanter | last post by:
I am writing a little routine to perform the following operations from an Acces 97 mdb: 1. create a fixed width text file 2. create/establish a table type link to the text file in Access 3....
7
by: Lisa | last post by:
I have an Access 2000 application that uses the following function to re-link my tables when I switch from my Current back end to a Dummy back end. I also use it to refresh my links. Function...
13
by: rdemyan via AccessMonster.com | last post by:
My front-end code manually links to the backend file. I was wondering what stops Access from linking to the system tables in the backend file. Is it just by virtue that they are hidden? This...
1
by: pemigh | last post by:
I'm almost done with an application, and trying to lock it down tightly. But I still want users to be able to point to a new location for the data file. The code below fires off to detect and...
7
by: ApexData | last post by:
Hello I currently Link the FE/BE using the LinkTables Option and the Linked Table Manager. Any time I need to move the BE to another location, I have to go through this process over again. I...
1
by: amygrant1701 | last post by:
Hi, I've done this before so I don't see what I could doing wrong here. I'm running mysql 5x on freebsd. I'm using the default data directory of "/var/db/mysql" In there I have several dozen...
0
ADezii
by: ADezii | last post by:
Rather than using CurrentProject.Connection or entering your own Connection information, ADO supports storing Connection information in an external file called a Data Link File (which normally has a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.