473,385 Members | 1,341 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,385 software developers and data experts.

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 3796
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***********@aol.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.googlegr oups.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
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:...
2
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
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. ...
7
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...
14
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...
2
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...
1
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...
7
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...
2
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.