473,888 Members | 1,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2105

<aa************ *@gmail.comwrot e in message
news:11******** **************@ 80g2000cwy.goog legroups.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.comwrot e in message
news:11******** **************@ 80g2000cwy.goog legroups.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.comwrot e in message
news:11******** *************@f 1g2000cwa.googl egroups.com...
Larry Linson wrote:
><aa*********** **@gmail.comwro te in message
news:11******* *************** @80g2000cwy.goo glegroups.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.

Alternativel y, 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.comwrot e in message
news:11******** *************@f 1g2000cwa.googl egroups.com...
Larry Linson wrote:
<aa************ *@gmail.comwrot e in message
news:11******** **************@ 80g2000cwy.goog legroups.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.goo glegroups.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
16282
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? 1) simply UPDATING the values for all fields in the table, whether or not any particular field has actually changed 2) running a second SELECT statement and comparing the $_POST vars to the returned values, and only UPDATING those that have...
3
1811
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 hyperlink causes the correct pair of web pages to be loaded into two windows. My current approach is to specify an onload action in the <BODY> tag of one of the pages that requests that the corresponding description page be loaded into the...
2
1849
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 copying the new/improved database back to the hard drive of the PC at the office. While I am working on the copy of the database at home, the database has data being entered into it at the office. My question is: how can I copy the new database...
1
4958
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 and one of the problems with this database is that all these files moved to new locations when a big server "move round" occured about a month ago. Whenever i right click the button that opens the page and select "Edit Hyperlink" i get a new...
3
1317
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 via a View - makes perfect sense. But because I used a View, I can't use the CommandBuilder. I have to specify my own Commands which will in some cases be huge and complex. This seems crazy - what if I change the db structure? And because I...
4
2382
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 two fields: a primary key and another holding a string. In table B there are three fields: a primary key, a foreign key (which links to the primary key in A) and other field holding a string.
4
3351
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 imported the existing report into Excel (Tools – Office Links – Analyze It with MS Excel). Then I linked the report to the Excel file. (File – Get External Data – Link tables) and a link table was automatically generated. I wanted to test the link,...
2
1642
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 lists each entry (from a PHP/MySQL db) with a remove button at the end of each record which feeds a unique ID to my ajaxfunction below: function ajaxFunction(rec){
2
3887
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 function in line #34: clickedRow.removeNode(true); Did you mean "removeChild"?
0
9802
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11186
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10780
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10887
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4642
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.