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

updating an ActiveX DLL by overwriting the existing dll

Hello,

I have a VB6 ActiveX DLL project that I use to connect to an SQL Server
database. The front end that uses this DLL is written in Access XP / 2002.
When I modify the ActiveX code, compile it and copy the DLL to the
production machine, the Access front end complains unless I pull the old
reference out of the "References" section of the tools menu item, close the
front end, open the front end and then re-reference the same library. Is
there a setting in the VB6 project that I can set so I don't have to do
this? I recall something to the effect that the component ID changes each
time the DLL is compiled using a certain setting, and it stays the same
under another setting. I can't seem to find those settings if this is the
case.

Any help would be greatly appreciated.

Thanks!
Rick
Oct 20 '08 #1
7 3051
Access is the culprit. I don't believe there's a way to defeat it.
When you place your DLL where it should be, The AddIn Manager writes
a copy of it locally. That's why you'll see AddIns that you've
uninstalled still in the list of AddIns that you can install with a
click. In the AddIn Manager, uninstall the target AddIn. Then delete
the local copy. Delete the old copy from the AddIns folder and
install the new copy there. Get back into AddIn Manager, add a new
AddIn, select the updated copy. AddIn Manager copies it to the local
folder and you can then click on it to install it. I haven't tried
just deleting the old copies and adding the new copy in the AddIns
folder.

Someday when I really have nothing to do I'll create another Virtual
PC, load Access and play with it.

HTH
--
-Larry-
--

"Rico" <me@you.comwrote in message
news:9z6Lk.2780$fF3.781@edtnps83...
Hello,

I have a VB6 ActiveX DLL project that I use to connect to an SQL
Server
database. The front end that uses this DLL is written in Access XP
/ 2002.
When I modify the ActiveX code, compile it and copy the DLL to the
production machine, the Access front end complains unless I pull the
old
reference out of the "References" section of the tools menu item,
close the
front end, open the front end and then re-reference the same
library. Is
there a setting in the VB6 project that I can set so I don't have to
do
this? I recall something to the effect that the component ID
changes each
time the DLL is compiled using a certain setting, and it stays the
same
under another setting. I can't seem to find those settings if this
is the
case.

Any help would be greatly appreciated.

Thanks!
Rick


Oct 20 '08 #2
Just re-read your post more carefully. I don't think my response
addressed your issue. Sorry about that.

--
-Larry-
--

"Rico" <me@you.comwrote in message
news:9z6Lk.2780$fF3.781@edtnps83...
Hello,

I have a VB6 ActiveX DLL project that I use to connect to an SQL
Server
database. The front end that uses this DLL is written in Access XP
/ 2002.
When I modify the ActiveX code, compile it and copy the DLL to the
production machine, the Access front end complains unless I pull the
old
reference out of the "References" section of the tools menu item,
close the
front end, open the front end and then re-reference the same
library. Is
there a setting in the VB6 project that I can set so I don't have to
do
this? I recall something to the effect that the component ID
changes each
time the DLL is compiled using a certain setting, and it stays the
same
under another setting. I can't seem to find those settings if this
is the
case.

Any help would be greatly appreciated.

Thanks!
Rick


Oct 20 '08 #3
You need to set the VB ActiveX DLL project's compatibility to "Binary
Compatibility" compatible (Default is "Project Compatibility"), once your
DLL is used in production. You do this in VB6 by click menu
"Project->[ProjectName] Properties..., and then select tab "Component"

"Binary Compatibility" means, the component's class ID remains unchanged
during compiling, as long as existing component interfaces are not changed.
When you do the compiling after modification/bug fixing, VB6 would test if
existing binary compatibility is broken or not and prompt you.

"Rico" <me@you.comwrote in message news:9z6Lk.2780$fF3.781@edtnps83...
Hello,

I have a VB6 ActiveX DLL project that I use to connect to an SQL Server
database. The front end that uses this DLL is written in Access XP /
2002. When I modify the ActiveX code, compile it and copy the DLL to the
production machine, the Access front end complains unless I pull the old
reference out of the "References" section of the tools menu item, close
the front end, open the front end and then re-reference the same library.
Is there a setting in the VB6 project that I can set so I don't have to do
this? I recall something to the effect that the component ID changes each
time the DLL is compiled using a certain setting, and it stays the same
under another setting. I can't seem to find those settings if this is the
case.

Any help would be greatly appreciated.

Thanks!
Rick

Oct 20 '08 #4
Excellent! Thanks Norman!

Rick

"Norman Yuan" <Fa******@FakeEmail.Notwrote in message
news:uo**************@TK2MSFTNGP02.phx.gbl...
You need to set the VB ActiveX DLL project's compatibility to "Binary
Compatibility" compatible (Default is "Project Compatibility"), once your
DLL is used in production. You do this in VB6 by click menu
"Project->[ProjectName] Properties..., and then select tab "Component"

"Binary Compatibility" means, the component's class ID remains unchanged
during compiling, as long as existing component interfaces are not
changed. When you do the compiling after modification/bug fixing, VB6
would test if existing binary compatibility is broken or not and prompt
you.

"Rico" <me@you.comwrote in message news:9z6Lk.2780$fF3.781@edtnps83...
>Hello,

I have a VB6 ActiveX DLL project that I use to connect to an SQL Server
database. The front end that uses this DLL is written in Access XP /
2002. When I modify the ActiveX code, compile it and copy the DLL to the
production machine, the Access front end complains unless I pull the old
reference out of the "References" section of the tools menu item, close
the front end, open the front end and then re-reference the same library.
Is there a setting in the VB6 project that I can set so I don't have to
do this? I recall something to the effect that the component ID changes
each time the DLL is compiled using a certain setting, and it stays the
same under another setting. I can't seem to find those settings if this
is the case.

Any help would be greatly appreciated.

Thanks!
Rick


Oct 21 '08 #5
"Norman Yuan" <Fa******@FakeEmail.Notwrote:
>You need to set the VB ActiveX DLL project's compatibility to "Binary
Compatibility" compatible (Default is "Project Compatibility"), once your
DLL is used in production. You do this in VB6 by click menu
"Project->[ProjectName] Properties..., and then select tab "Component"

"Binary Compatibility" means, the component's class ID remains unchanged
during compiling, as long as existing component interfaces are not changed.
When you do the compiling after modification/bug fixing, VB6 would test if
existing binary compatibility is broken or not and prompt you.
Thanks for that explanation.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Oct 21 '08 #6

"Larry Daugherty" <La********************@verizon.netwrote in message
news:uf**************@TK2MSFTNGP06.phx.gbl...
Just re-read your post more carefully. I don't think my response
addressed your issue. Sorry about that.
Nope. Doesn't really have anything to do with Access at all (therefore, it's
actually off-topic for an Access newsgroup). As Norman said, binary
compatibility needs to be set for the VB6 DLL. If binary compatibility is
ever broken in the DLL, then this same problem will re-occur. Generally, you
can ADD new public properties, methods, and events to the DLL without
breaking binary compatbility. However, you cannot change or delete anything
exposed in the public interface. You can change the code for any of those,
but you can't change the procedure header (for example, parameters passed to
methods, any data types, etc.).

--
Mike
Oct 21 '08 #7
"Rico" <me@you.comwrote in message news:fw9Lk.2816$fF3.431@edtnps83...
Excellent! Thanks Norman!

Rick

"Norman Yuan" <Fa******@FakeEmail.Notwrote in message
news:uo**************@TK2MSFTNGP02.phx.gbl...
>You need to set the VB ActiveX DLL project's compatibility to "Binary
Compatibility" compatible (Default is "Project Compatibility"), once your
DLL is used in production. You do this in VB6 by click menu
"Project->[ProjectName] Properties..., and then select tab "Component"

"Binary Compatibility" means, the component's class ID remains unchanged
during compiling, as long as existing component interfaces are not
changed. When you do the compiling after modification/bug fixing, VB6
would test if existing binary compatibility is broken or not and prompt
you.
There's a few "gotchas" involved, though... always remember the file you're
relying on for compatibility *must* include all publics. If you add
something new, you need to updated the file you're using for compatibility.
http://www.vbsight.com/BinaryComp.htm

--
Ken Halter
Part time groupie
Oct 21 '08 #8

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

Similar topics

1
by: Ellixis | last post by:
Hello, How can I use fwrite() and fseek() in order to write data in the middle (or anywhere else) of a file without overwriting existing data ? People told me that I should load the file into...
7
by: Paige | last post by:
I have a database on my local machine that I make entries and corrections on. I'd like to be able to upload that to my server and have that update the database that's on the server. What I've been...
1
by: Chance Lerro | last post by:
Here's another way to PREVENT the install program for run-time Access from overwriting existing file associations: 1. Edit the Runtime MSI file with Orca, InstallShield, etc.. 2. Go to the...
2
by: Kevin Blount | last post by:
I have an issue with trying to add a new name-pair to an existing cookie. Here's what I want to do: page1 - adds "loggedin=true" to cookie "Communities" adds "member_id=100" to cookie...
4
by: vancehome | last post by:
I have a series of macros running everynight creating tons of excel files (using transfer spreadsheet). I then have another program that zips them up and emails them all over the place. It then...
1
by: arcingmad | last post by:
Hi I am using the following code in a button click event to run a query stored in a .mdb file from an external geographic program ArcGIS via a jet adodb connection I have the need to run an...
12
lotus18
by: lotus18 | last post by:
Hi everyone I have a little problem in updating a record. I know how add a new record and check if the inputted new data is existing or not as what they have discussed in...
27
by: Jason | last post by:
Hi, I need to open an existing file, seek to a position at X number of bytes, and write out Y number of bytes overwriting any existing bytes, but no erasing any other data. Is this possible? ...
5
sueb
by: sueb | last post by:
In my Access database, I have a button on a form that copies a set of existing Word documents to a location (associated with the record on that form). However, I don't want an existing file to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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
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...
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...
0
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,...

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.