Solved

Upgrade from VB3 to VB5.

Posted on 1998-05-05
7
437 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
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb6 programatically bring window to front 8 72
Saving history changes to sub form 4 43
Determine Range to Select 5 48
Put text in a picture ASP.NET C# 2 57
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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…

803 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