Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 461
  • Last Modified:

Upgrade from VB3 to VB5.

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
jonesrw
Asked:
jonesrw
  • 4
  • 2
1 Solution
 
clifABBCommented:
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
 
zsiCommented:
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
 
zsiCommented:
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
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!

 
zsiCommented:
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
 
jonesrwAuthor Commented:
Thanks for you helpful answer......how do I read the html script???
0
 
jonesrwAuthor Commented:
Thanks for your helpful answer......how do I read the html script???
0
 
zsiCommented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now