473,404 Members | 2,195 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,404 software developers and data experts.

Updating Table Links on Install

I have an application which contains an Access database with linked
tables that point to another database within the application. The
problem I have is that when the user installs the application, I need
to update the table links so that the paths are correct for the install
directory. Is there an easy way to accomplish this?

I'd really like to avoid duplicating the data in the linked tables, but
if updating the links is too much work, I may just do that.

Dec 4 '06 #1
5 2044

<aa*************@gmail.comwrote in message
news:11**********************@80g2000cwy.googlegro ups.com...
>I have an application which contains an Access database with linked
tables that point to another database within the application. The
problem I have is that when the user installs the application, I need
to update the table links so that the paths are correct for the install
directory. Is there an easy way to accomplish this?

I'd really like to avoid duplicating the data in the linked tables, but
if updating the links is too much work, I may just do that.
The Developer Solutions sample database (see
http://support.microsoft.com/kb/248674/en-us in the Microsoft Knowledge Base
for information on the free download) has sample code for relinking tables
at startup.

Alternatively, the article at http://support.microsoft.com/kb/248674/en-us
tell you how to let the user use the Windows Common Dialog to choose a file
(the backend database) and you can create a TableDef with the link for each
table.

I use an approach very similar to the one in Developer Solutions that I
created prior to that sample database being available. It hasn't changed
much since the 16-bit Access 2.0 for which I initially created it.

Larry Linson
Microsoft Access MVP
Dec 4 '06 #2
Larry Linson wrote:
<aa*************@gmail.comwrote in message
news:11**********************@80g2000cwy.googlegro ups.com...
I have an application which contains an Access database with linked
tables that point to another database within the application. The
problem I have is that when the user installs the application, I need
to update the table links so that the paths are correct for the install
directory. Is there an easy way to accomplish this?

I'd really like to avoid duplicating the data in the linked tables, but
if updating the links is too much work, I may just do that.

The Developer Solutions sample database (see
http://support.microsoft.com/kb/248674/en-us in the Microsoft Knowledge Base
for information on the free download) has sample code for relinking tables
at startup.

Alternatively, the article at http://support.microsoft.com/kb/248674/en-us
tell you how to let the user use the Windows Common Dialog to choose a file
(the backend database) and you can create a TableDef with the link for each
table.

I use an approach very similar to the one in Developer Solutions that I
created prior to that sample database being available. It hasn't changed
much since the 16-bit Access 2.0 for which I initially created it.

Larry Linson
Microsoft Access MVP
Thanks for the link. One question: will the automatic relinking
trigger when a database connection is made through ADO, or only if the
database is opened in Access?

Dec 4 '06 #3
Table linking, as addressed in the sample database, is a matter of
definition of the tables, that is, the TableDefs Collection, in an MDB. The
code illustrated is VBA and DAO code. I can't imagine a good reason to use
ADO with a Jet database, because DAO is the native language of Jet. And, as
for me, I prefer to use DAO and link tables via ODBC even with server
databases.

The only advantage (if any) that I can see to using ADO, is using it with
another database, and without linking, via OLEDB (also called "an ADO data
provider"), so I just don't understand your follow-up question.

Someone else would have to discuss whether linked Tables makes any sense in
an ADO environment -- I certainly can't, as the only times I have used ADO
were some early practice testing and on projects done with an Access ADP
(aks "Access Project") that used ADO via OLEDB to access Microsoft SQL
Server directly. (And, as I have said before, I was unable to determine any
improvement in performance, and certainly none in ease of development with
the ADP - ADO - OLEDB - MS SQL Server environment. I'd work on such a DB
again if a customer alreeady had one and insisted, but I'd refer them to
another develper if they insisted on creating a new database in that
environment.

Larry Linson
Microsoft Access MVP
<aa*************@gmail.comwrote in message
news:11*********************@f1g2000cwa.googlegrou ps.com...
Larry Linson wrote:
><aa*************@gmail.comwrote in message
news:11**********************@80g2000cwy.googlegr oups.com...
>I have an application which contains an Access database with linked
tables that point to another database within the application. The
problem I have is that when the user installs the application, I need
to update the table links so that the paths are correct for the install
directory. Is there an easy way to accomplish this?

I'd really like to avoid duplicating the data in the linked tables, but
if updating the links is too much work, I may just do that.

The Developer Solutions sample database (see
http://support.microsoft.com/kb/248674/en-us in the Microsoft Knowledge
Base
for information on the free download) has sample code for relinking
tables
at startup.

Alternatively, the article at
http://support.microsoft.com/kb/248674/en-us
tell you how to let the user use the Windows Common Dialog to choose a
file
(the backend database) and you can create a TableDef with the link for
each
table.

I use an approach very similar to the one in Developer Solutions that I
created prior to that sample database being available. It hasn't changed
much since the 16-bit Access 2.0 for which I initially created it.

Larry Linson
Microsoft Access MVP

Thanks for the link. One question: will the automatic relinking
trigger when a database connection is made through ADO, or only if the
database is opened in Access?

Dec 5 '06 #4
I probably should have noted up front that this isn't a native Access
app. I used ADO because when I started adding DAO components to my
VC++ application I got lovely deprecation warnings.

I'll probably just import the tables and deal with having two copies.
It's a pretty small amount of data so there's really no major issues
with that for now. It's just not elegant. But then, we write
applications with the databases we have, not the databases we might
want. ;)

Larry Linson wrote:
Table linking, as addressed in the sample database, is a matter of
definition of the tables, that is, the TableDefs Collection, in an MDB. The
code illustrated is VBA and DAO code. I can't imagine a good reason to use
ADO with a Jet database, because DAO is the native language of Jet. And, as
for me, I prefer to use DAO and link tables via ODBC even with server
databases.

The only advantage (if any) that I can see to using ADO, is using it with
another database, and without linking, via OLEDB (also called "an ADO data
provider"), so I just don't understand your follow-up question.

Someone else would have to discuss whether linked Tables makes any sense in
an ADO environment -- I certainly can't, as the only times I have used ADO
were some early practice testing and on projects done with an Access ADP
(aks "Access Project") that used ADO via OLEDB to access Microsoft SQL
Server directly. (And, as I have said before, I was unable to determine any
improvement in performance, and certainly none in ease of development with
the ADP - ADO - OLEDB - MS SQL Server environment. I'd work on such a DB
again if a customer alreeady had one and insisted, but I'd refer them to
another develper if they insisted on creating a new database in that
environment.

Larry Linson
Microsoft Access MVP
<aa*************@gmail.comwrote in message
news:11*********************@f1g2000cwa.googlegrou ps.com...
Larry Linson wrote:
<aa*************@gmail.comwrote in message
news:11**********************@80g2000cwy.googlegro ups.com...
I have an application which contains an Access database with linked
tables that point to another database within the application. The
problem I have is that when the user installs the application, I need
to update the table links so that the paths are correct for the install
directory. Is there an easy way to accomplish this?

I'd really like to avoid duplicating the data in the linked tables, but
if updating the links is too much work, I may just do that.

The Developer Solutions sample database (see
http://support.microsoft.com/kb/248674/en-us in the Microsoft Knowledge
Base
for information on the free download) has sample code for relinking
tables
at startup.

Alternatively, the article at
http://support.microsoft.com/kb/248674/en-us
tell you how to let the user use the Windows Common Dialog to choose a
file
(the backend database) and you can create a TableDef with the link for
each
table.

I use an approach very similar to the one in Developer Solutions that I
created prior to that sample database being available. It hasn't changed
much since the 16-bit Access 2.0 for which I initially created it.

Larry Linson
Microsoft Access MVP
Thanks for the link. One question: will the automatic relinking
trigger when a database connection is made through ADO, or only if the
database is opened in Access?
Dec 5 '06 #5
aa*************@gmail.com wrote in
news:11**********************@l12g2000cwl.googlegr oups.com:
I probably should have noted up front that this isn't a native
Access app.
Ya think?

The question doesn't even belong in this newsgroup, as you're not
using Access at all -- you're just using Jet.

And all answers regarding "linked tables" are, by definition,
Access-specific answers, and won't help you at all if you're not
actually using Access.

I really wish Microsoft would not use "Access database" and "Jet
database" interchangably.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 5 '06 #6

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

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
3
by: Jim Cobban | last post by:
I have a set of web pages that are organized in pairs. One of each pair contains a graphic and the other is an extended description of the graphic. I am trying to set it up that selecting a single...
2
by: RC | last post by:
I am updating/improving a working database for a non-profit organization. I am thinking of making a copy of the database at the office, bringing the copy to my house, making the changes and then...
1
by: Darryl Neale | last post by:
I have been tasked with reviving an old database that stopped working about 3 years ago :( On one of the tabs is a list of links to other databases utilising the Hyperlink feature of MS Access...
3
by: Doug | last post by:
Scenario: I select data from a SQL Server View which links 3 tables, into a single dataset table. I update some of those fields on a web form. When I want to update the db, clearly I can't update...
4
by: Geoff | last post by:
Hi I'm hoping somebody can help me with the following problem that has occurred to me. Suppose I have two tables in an SQL Server database. Let's call these tables A and B. Assume that A has...
4
by: somanyusernamesaretakenal | last post by:
What I am trying to achieve: Basically I have generated a report in access. This report needs to be updated using excel. (Updating the new data, not changing existing data) What I did was I...
2
by: UKuser | last post by:
Hi Folks, I havent used javascript in ages, and am not the worlds guru, but I'm playing with ajax linking to my database and an updating area. I have an area named display for example which...
2
by: Conrad Lender | last post by:
On 2008-10-10 19:56, T.G. wrote: This doesn't work at all, at least not in Firefox. When any of the "up" or "down" links is clicked, the following error occurs: clickedRow.removeNode is not a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.