Solved

Upgrade from VB3 to VB5.

Posted on 1998-05-05
7
447 Views
Last Modified: 2012-06-27
I am upgrading a medium sized application from VB3 to VB5.  Are there any known issues/problems that I should look out for?  In particular I am using a lot of data access code (createsnapshot etc) on an Access database and and external Oracle database.
0
Comment
Question by:jonesrw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 6

Expert Comment

by:clifABB
ID: 1440479
Your data access code should port over fairly ok.  VB5 is backward compatible.

The biggest issue I've seen (and dealt with) is having ocx versions of the vbx's.
0
 
LVL 4

Accepted Solution

by:
zsi earned 100 total points
ID: 1440480
There are several issues that you will have to look out for in porting your VB3 code to VB5.  The biggest issue that you will have to deal with is that VB5 does not use VBXs.  You will have to upgrade ALL of your controls to OCX/ActiveX controls.  

Next, as VB5 is only available for developing 32bit applications, any API calls that you make must be converted to support the 32bit environments.  Specifically, this will apply to the Windows API where all resource handles are now of type Long, as opposed to type Integer.

Data access (JET) works a little differently in VB5.  The changes aren't major, but the will require some modifications.  The most significant of these changes are with snapshots, dynasets, and the like.  They are now collectively referred to as recordsets.  Their behaviors is determined by a parameter in the OpenDatabase function.  The help file for VB5 should detail conversion issues for database access.

Your ODBC drivers will need to be replaced with 32bit drivers, and any functions calls will have to be updated as necessary.

Some commands and functions in VB3 have been replaced with new ones in VB5.  While VB5 still supports these deprecated commands, Microsoft does not guarantee support for them in future versions.

Hope this helps!

zsi
0
 
LVL 4

Expert Comment

by:zsi
ID: 1440481
Further Reading:

Microsoft Press' book "Advanced Visual Basic 5" has an entire chapter devoted to converting existing versions of VB.  It details the pros and cons, the whats and whys.  If you have the current version of the MSDN, the full book is on the Library disc.  

Thise excerpt from the book might also prove useful.  For formatting purposes, I have included it as HTML.

zsi
==============================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
<title>Summary of Changes from a Previous Version of Visual Basic to Visual Basic 5</title>
<style>@import url(stylesheets/msdn_ie4.css);</style>
<link disabled rel="stylesheet" href="stylesheets/msdn_ie3.css"></HEAD>
<BODY BGCOLOR=#FFFFFF TEXT=#000000>
<FONT FACE="Verdana,Arial,Helvetica" SIZE="2"><form name=x><object name=iv classid="clsid:9c2ac687-ceef-11cf-96d9-00a0c903b016">
</object></form>
<h1><a name="summaryofchangesfrompreviousversionofvisualbasictovisualbasic5"></a>Summary of Changes from a Previous Version of Visual Basic to Visual Basic 5</h1>
<p>
The following table shows the changes you need to consider when you convert from a previous version of Visual Basic to Visual Basic 5.</p>
<table border=1 cellpadding=5 cols=4 frame=below rules=rows>
<tr valign=top>
<td class=blue width=148><b>Possible Pitfall</b></td>
<td class=blue width=148><b>Visual Basic 3 </b></td>
<td class=blue width=148><b>16-Bit Visual Basic 4</b></td>
<td class=blue width=148><b>32-Bit Visual Basic 4</b></td>
</tr>
<tr valign=top>
<td width=148>DAO</td>
<td width=148>Changed</td>
<td width=148>Changed</td>
<td width=148>Changed</td>
</tr>
<tr valign=top>
<td width=148>Windows 3.<i>x</i> APIs no longer available</td>
<td width=148>Unchanged</td>
<td width=148>Unchanged</td>
<td width=148>Changed</td>
</tr>
<tr valign=top>
<td width=148>Shell changes</td>
<td width=148>If moving from Windows 3.<i>x</i> to Windows 95 or Windows NT 4</td>
<td width=148>If moving from Windows 3.<i>x</i> Windows 95 or Windows NT 4</td>
<td width=148>If moving from Windows 3.<i>x</i> to Windows 95 or Windows NT 4</td>
</tr>
<tr valign=top>
<td width=148>New ODBC API library</td>
<td width=148>Changed</td>
<td width=148>Changed</td>
<td width=148>Unchanged</td>
</tr>
</table><br>
<h1></h1>
</BODY>
</HTML>



0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 4

Expert Comment

by:zsi
ID: 1440482
The book also makes reference to a VB3 to VB5 migration utility.  As I only have an electronic version of the book, I do not not if this is included or if it is a separate utility.  However, It is supposed to automatically convert API declarations and generate reports on  other VB3-related issues.

zsi
0
 

Author Comment

by:jonesrw
ID: 1440483
Thanks for you helpful answer......how do I read the html script???
0
 

Author Comment

by:jonesrw
ID: 1440484
Thanks for your helpful answer......how do I read the html script???
0
 
LVL 4

Expert Comment

by:zsi
ID: 1440485
Copy the HTML script into Notepad and save the file to a temporary directory.  Name it something like "Conversion.htm".  Then, load the page in to your browser of choice.
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 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