Solved

Upgrade from VB3 to VB5.

Posted on 1998-05-05
7
434 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
  • 4
  • 2
7 Comments
 
LVL 6

Expert Comment

by:clifABB
Comment Utility
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
Comment Utility
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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 4

Expert Comment

by:zsi
Comment Utility
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
Comment Utility
Thanks for you helpful answer......how do I read the html script???
0
 

Author Comment

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

Expert Comment

by:zsi
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now