[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB6 project (VBP) file changes upper/lowercase among computers

Posted on 2009-04-21
7
Medium Priority
?
591 Views
Last Modified: 2012-05-06
We check in our VB6 project on PC 1, and get it on PC 2.

When we want to run (F5) it on PC 2 VB6 says it cannot save the VBP file (which is readonly because not checked out). Strange because nothing changed, we only loaded the project and want to run it.

I checkout the VBP file and saved it to diff the changes, and on a few lines are changed the case is changed:

(See \ADO)
Repository version: Program Files\Common Files\System\ado\msado26.tlb
Working version: Program Files\Common Files\System\ADO\msado26.tlb

On both machines there is the same directory:
C:\Program Files\Common Files\System\ado

Another difference:
Object={5664FAD6-05FD-11D4-AABA-00105A6F87AB}#1.0#0; dxeditrs.dll
Object={5664FAD6-05FD-11D4-AABA-00105A6F87AB}#1.0#0; dxEditrs.dll

Both DLL's are installed with capital E, the filename is the same on both drives.

Object={6A24B331-7634-11D3-A5B0-0050044A7E1A}#1.7#0; dXDBGrid.dll
Object={6A24B331-7634-11D3-A5B0-0050044A7E1A}#1.7#0; dxdbgrid.dll

Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
and so on

Both PC's run VB6 SP6.

I hope someone can give me some information why VB6 changes cases of references and paths in the project file.

Rene


0
Comment
Question by:_Rene_
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:HooKooDooKu
ID: 24197326
First of all... it sort of seems to be a fact of life with VB6 projects.  Even for projects I create on my machine, put in source safe from my machine, and reload from my machine, if I want to run the application, VB wants to save the file even if nothing has changed.

Now logically, something that sort of does change every time a VB project opens is that it wants to update the ActiveX OCX/DLL links to match what ever is on the local machine.  I know this is something that has tripped us up before... create a project on one machine, load it on another machine with newer versions of an ActiveX OCX/DLL, then try to reload the project on the old machine and it fails to properly load because VB can't seem to "down grade" the OCX/DLL to what is on the older machine.

As a guess (and this is sort of a guess), the reason VB wants to save the VBP file is because even if nothing has seemed to change, because it always attempts to update ActiveX links, the moment the VBP file is openned, it is immediately "dirty" because it attempted to update the ActiveX links.  As for the upper-case vs lower case, as a guess, perhaps the controls are registered on one machine with one case, and registered on the other machine in the other case.  If so, again, VB attempts to update the ActiveX links when the VBP is openned.
0
 
LVL 11

Expert Comment

by:Antagony1960
ID: 24198737
Go to Tools|Options|Environment, there you will see some options for what VB6 should do when a program starts. If it is set to 'Save Changes', it will attempt to re-write the VBP file whether it has been changed or not -- I don't know why. You may be tempted to set it to 'Don't Save Changes' and handle the saving yourself, but I would caution against that as it is too easy to forget to save before running and end up losing work if something happens to make it crash. The safest option is to set it to prompt, in which case it will run an unchanged program without prompting but could become a bit of an annoyance if you're making changes and testing frequently.
0
 

Author Comment

by:_Rene_
ID: 24203614
It seems there is no solution for this problem other then 'live with it'.

I am not sure if this is related to my other post about DynamicReports that marks all binary files dirty after a build.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Accepted Solution

by:
HooKooDooKu earned 2000 total points
ID: 24204462
One of the things we do is to maintain two copies of the VBP.  One copy is the "developement" version that the programers are free to load.  It's "ok" if they mess that one up because of things like different versions of DLLs (a big issue if your project includes DLLs you've written yourself and therefore likely change all the time).  We then also maintain a "release" copy this is only ever openned from the "official" compiler machine.

With this scheme, you're always safe allowing the "developement" version of the VPB from getting saved every time you want to do something, yet presurve binary compatibility and avoid undesired changes in your "release" copy.
0
 

Author Comment

by:_Rene_
ID: 24216489
HooDooDooKu,

Nice solution, but I don't see how to use your solution with source control because the 'free' VPB is not bound to it.

Rene
0
 
LVL 16

Expert Comment

by:HooKooDooKu
ID: 24218618
Keep the "free" VBP in source safe as well.  There isn't any reason why multiple VBPs can't exist in the same folder/source-safe.  But the idea is that even if someone else has it checked out at any given time, because it's an "unofficial" copy, you're always free to just make it writable on your local machine without worrying about overwritting someone else's code changes.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month17 days, 15 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question