473,769 Members | 4,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update references from code

I update code on several machines and find myself constantly correcting
references (e.g. Word 11 to Word 9, adding ADO x.x library, sometimes
even Jet Expression Service Type Library) when I copy the newest
version to another machine.

Some run Windows 2000, some XP, various versions of Office.

I need a method of doing this in code when the start screen is loaded:
1. checking the current computer for the latest version of all needed
references
2. updating all references.

I am using Access 97, though on some machines I convert it to 2003.

May 5 '06 #1
7 3828
Why not just use late binding? Then you don't have to change or check
the references at all...

May 5 '06 #2
Okay, I've done that for Word & Excel, but what about ADO? I am not
sure how to do that.

May 5 '06 #3
pe***********@a ol.com wrote:
Okay, I've done that for Word & Excel, but what about ADO? I am not
sure how to do that.


Maybe
http://support.microsoft.com/kb/172733

/jim
May 5 '06 #4
<pe***********@ aol.com> wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.com.. .
Okay, I've done that for Word & Excel, but what about ADO? I am not
sure how to do that.


Without question, you need late binding for word/excel etc.

As for ADO?

You should NOT NEED to mess with the ado references, and I have no idea why
you are....

Of course, you do need to cut a version of your software for a particular
version of office. You can't expect software developed in a2000 to work with
a2003 unchanged. (often it does..but, really, you need to create a version
for each office you are using).

It is not clear what machines/versions you are distributing your application
to, but I would suggest you that distribute a mde. So, if users need a 2000
version, then you distribute a a2000 mde. If you use the default ADO
reference for each version, then you will not have nay problems at all.

I would STRONGLY recommend that you don't mess with the ADO reference, but
just use the default one for the particular version....

The problem here is that a97 does not have built in support for ado...so, I
not really sure why you are having a problem anyway. Are you mixing dao and
ado code in the same application? (and, if you are...why are you???).

For a2000 to a2003, you should not need to touch, or change the ado
reference anyway. Further, you should not as a rule have to change any code.

So, fix the late binding for other office applications, and leave the ado
ref alone...it should work ok....

However, for a2000 to a2003, while they all default to a2000 format, you
REALLY REALLY REALLY REALLY need to do a de-compile and then a re-compile in
a2000 (or a2002) to ensure ANY degree of relibliry here. So, if you move the
mdb to a different version of office, do a de-compile..and re-compile first.
(or, as mentioned, create a mde for each version of office...but you still
want to do a de-compile before you create the mde if you follow this
advice).

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl************* ****@msn.com
http://www.members.shaw.ca/AlbertKallal

May 6 '06 #5
>Albert D. Kallal wrote:
As for ADO?
You should NOT NEED to mess with the ado references, and I have no idea why
you are...


Well, to tell the truth, I kind of wondered about that myself. So I
just went to "Machine2" so I could document the problem for you
precisely, and LO AND BEHOLD, it has disappeared.

But, for the sake of curiosity, I'll describe what used to happen.

Develop on Machine1 - running Windows 2000 SP4, Access 97 SR2, Jet
Copy to Machine2 - running Windows XP, Access 97 but also has Access
2003 SP2

Word & Excel would update themselves from version 9 to version 11, but
not vice-versa (e.g. if I happened to copy from 2 to 1 I had to
manually change references. So, ok, I got rid of those references &
used late binding as recommended here, which is really not a problem
because there are maybe 2 or 3 places where we use either one).

As far as I can now recall, on Machine2 no functions would work until I
manually checked a reference to Microsoft Active-X Data Objects 2.7
library.

And now, suddenly, that is checked all by itself, and actually I still
see it on Machine1.

So, what has changed? Late binding of Word & Excel. And, have
installed RTF Control from Steve Lebans, with RTF2 Active-X Control
module. Could that be what makes the difference?

May 10 '06 #6
Great...sounds like things are working much better...
So, what has changed? Late binding of Word & Excel. And, have
installed RTF Control from Steve Lebans, with RTF2 Active-X Control
module. Could that be what makes the difference?


The late binding likely does help, since then you don't have a bunch of
references that need to be changed, or can break....

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl************* ****@msn.com
http://www.members.shaw.ca/AlbertKallal
May 10 '06 #7
So, are you saying that early binding of Word & Excel could have caused
the ADO ref to break?
I guess it's just one of those bugs, er, features?

(and, I also at one point had to add JET Expression Service Type
Library. I think I've even seen the DAO Object Library break.
Fortunately, a bit of googling this group & I was usually up and
running pretty fast. Thanks, all.)

May 10 '06 #8

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

Similar topics

0
5913
by: Fraser Hanson | last post by:
Hello, I have a table which has a foreign key relationship with itself. I want and expect my updates to cascade (deletes definitely cascade as expected) but instead I just get error 1217: foriegn key error. I have written example code to use in reproducing the problem: # Create the table
2
39427
by: Gunnar Vøyenli | last post by:
Hi! For the sake of simplicity, I have three tables, Employee, Department and Work Employee >---- Department \ / \ / ^ ^ Work
0
3737
by: Jerry Brenner | last post by:
Our users have potentially dirty legacy data that they need to get into our application. We provide a set of staging tables, which map to our source tables, that the users do their ETL into. Every row in the source tables has a generated integer id. Every row in both the source and staging tables has a unique publicid (varchar(22)). All foreign key references in the staging tables are through publicids. (The foreign key reference could...
7
21453
by: Justin | last post by:
I am extremely new at SQL Server2000 and t-sql and I'm looking to create a simple trigger. For explanation sake, let's say I have 3 columns in one table ... Col_1, Col_2 and Col_3. The data type for Col_1 and Col_2 are bit and Col_3 is char. I want to set a trigger on Col_2 to compare Col_1 to Col_2 when Col_2 is updated and if they're the same, set the value on Col_3 to "Completed". Can someone please help me? Thanks, Justin
14
4300
by: serge | last post by:
I have a scenario where two tables are in a One-to-Many relationship and I need to move the data from the Many table to the One table so that it becomes a One-to-One relationship. I need to salvage the records from the many table and without going into detail, one of the reasons I can't do the opposite as there are records in the ONE table that I need to keep even if they don't have any child records in the MANY table. Below I created...
2
2522
by: serge | last post by:
/* This is a long post. You can paste the whole message in the SQL Query Analyzer. I have a scenario where there are records with values pointing to wrong records and I need to fix them using an Update statement. I have a sample code to reproduce my problem. To simplify the scenario I am trying to use Order related tables to explain a little better the tables i have to work with.
1
3689
by: Grant McLean | last post by:
Hi First a simple question ... I have a table "access_log" that has foreign keys "app_id" and "app_user_id" that reference the "application_type" and "app_user" tables. When I insert into "access_log", the referential integrity triggers generate these queries: SELECT 1 FROM ONLY "public"."application_type" x
7
9782
by: Jon Maz | last post by:
Hi, I have a MySql problem I hope someone can help me with. I'm trying to run an update on a linking table, the update is running into a Primary Key constraint violation, and in my workaround I've got stuck trying to write a DELETE statement. Here's the table I'm working on: CREATE TABLE `articles_categories` (
2
5659
by: joeyrhyulz | last post by:
Hi, I'm trying to make a very simple update statement (in Oracle) in jet sql that seems much more difficult than it should be. The root of my problem is that I'm trying to update a field on a table using dmax, which references another query to update the table. Although I have all of the correct keys from the physical table joined to the query in the dmax function, the code/ms access seems to ignore the joins. As a result, all payees...
0
9423
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
10212
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
9863
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
8872
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
7410
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
6674
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();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
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
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.