Thinking of upgrading a sizable vb 6.0 application to

Posted on 2005-05-12
Last Modified: 2010-05-01
Hi Experts,
I've been asked to look into the possibility of upgrading a large vb 6.0 application to
My brother would prefer it to be accessible from the internet rather than installing it  as a client app on every client's PC.

The system is installed on client PCs and they can connect to a SQL server 2000 ( which is on a Windows 2003 server) remotely or via a LAN.
Can you give me some serious pointers as to how I would proceed.
Especially with regards to migating the vb 6.0 code, forms, module etc ( if possible) and what security aspects and server consideration I would have to consider.

Would this require a complete re-code ?
This would be a serious move and I need some expert advice

many thanks
Question by:jvize
    LVL 6

    Expert Comment

    it is going to be a large undertaking that much i can assure you ;)
    LVL 12

    Expert Comment

    LVL 12

    Expert Comment

    Don't use the import wizard if you intend to work with the code later on - and I can almost guarantee that it will need some work. My experiences with the Wizard are basically: Look what it does and re-code manually. Parts of the code are unusable, parts will not work, parts will be not understandable and some parts may actually work well (unfortunately, this appears to be the exception rather than the rule).

    I'd suggest to re-design from scratch. The object model in .NET is completely different, database and file access are different, the syntax is different, class modelling is partly different... - It's probably faster than trying to convert semi-automatically.

    Security: Can't comment on that, but I'd assume you'd have to code security yourself. Most databases are rather weak in supporting security. But if your application has security today, you probably can just port this to the new version.

    Server: Probably depends mostly on the database and the transactions you're planning to do. Since it's a DB application which probably accesses the server even today, requirements will not be that much different - add some 20% or 50% of RAM, CPU and disk space and you'll probably be fine.


    Author Comment

    Christ a complete re-design.. :(
    For a very good VB 6.0 programmer will this take much time ?
    The VB 6.0 in this app had no class declaration's pruely procedural ( sub, functions etc ) if you follow my drift.
    My bother is hoping for an october relase of the new system.
    I do have the entire summer to get this done.

    I'm not after a hardware spec for the server implemenation..I want to know will it need a seperate web server to host the SQL Server 2000...or what ?..does the Windows 2003 server become obsolite ?
    Security is screaming at me folks ..need input on this

    Got some very good info so far.
    I will add more points to this posted question, till I get what I need to proceed.

    .So far, am I opening my eyes to new programming language ?  or a differnt approach ?

    Is VB.Net that different to Vb 6.0 ..syntax wise ?
    jesus it's a big appliaction :)  ( forgive the Irish  turn of phrase..not my fault ..I'm irish)
    can I avoid class declaration stuff ? nad stick to procedures and function calls ?

    LVL 12

    Accepted Solution

    VB.Net is not just a next version of VB, it's a completely new programming language with a new programming paradigm. It just happens to carry the same name as VB (probably a marketing thing). From the point of view of effort, changing from VB to VB.Net is comparable to changing from VB 6 to C#.Net. VB.Net is nearer to Java than to VB.

    Just a quick example (from ): This is the code for a "hello world" program in VB.Net and ASP:

    Public Class HelloWorld

        Inherits System.Web.UI.Page
        Protected WithEvents lblName As System.Web.UI.WebControls.Label
        Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
        Protected WithEvents txtName As System.Web.UI.WebControls.TextBox
        Protected WithEvents lblHello As System.Web.UI.WebControls.Label

        Public Sub btnSubmit_Click(ByVal sender As Object, ByVal e As
            txtName.Visible = False
            lblName.Visible = False
            btnSubmit.Visible = False
            lblHello.Text = "Hello World (by " + txtName.Text + ")"
            lblHello.Visible = True
        End Sub
        Protected Sub WebForm1_Load(ByVal Sender As System.Object, ByVal e
                                                       As System.EventArgs)
            ' Evals true first time browser hits the page
            If Not IsPostback Then
                lblHello.Visible = False
            End If
        End Sub
    End Class

    All clear? :-)

    To find out more, check out this tutorial which explains some of the VB.Net concepts: .

    Even a very experienced programmer will need a few weeks to become fluent in If you've never worked with classes, add more weeks. If you need DB access, add again more weeks. Not coding, just learning.

    Since you want to port the application to work on the Web, you really need to adhere to the .NET concepts, i.e. no more spaghetti code, but classes and objects (although you can create spaghetti classes, too). This also helps to avoid security issues. A big application probably will need some careful class and DB design, so add some weeks for this. If you've never done classes, add some weeks for learning about advanced class design. Also remember that DB access is completely (COMPLETELY!!) different.

    Server: You could install IIS on the SQL Server, this shouldn't be a problem. IIS, ASP and SQL are well integrated. You don't need to replace the server.

    All put together: I'd recommend to take yourself more time; the October deadline wan't be easy to meet if the application is really big (more than one or two dozend of forms or so). Remember that even if the application could be ported using the Wizard, you have to retest everything, because some of the assumptions of the languages are different: For example, in .NET, arrays are always zero-based (0...n-1) whereas in VB, they are always one-based (1...n). Just this feature will require rethinking bits of the code.

    I personally would suggest to really re-think the application from scratch and re-design it in an object way. This could be a nice opportunity to add features the customers want and to remove old stuff you don't really need any more. Porting a complex application will require at least the same amount of work as recoding from scratch.  
    LVL 12

    Expert Comment

    Thank you and good luck!
    LVL 1

    Expert Comment

    Skip and do it in C# I guarantee you that you will regret spending all that time converting to VB.Net only to see microsoft dump VB.Net in the next 2-3 years.  I am in a very similar situation to your brother and I opted to spend time making my VB6 Prg look like a .Net app by using things like VBSkinner and CoolXp rather than recode the whole thing. My app had almost no bugs and 5 years of field use, no way am I going back to dozens of daily calls and debugging all night.

    Ask Yourself a Few Questions

    Is this for cosmetic reasons? (If so you can get that without Migrating)

    Is there something that I need to do in that I cant do in VB6 even with 3rd party addons

    Am I willing to rewrite the code from scratch, that's what it wil take.

    If you still want to go ahead, I really really recommend not using VB.Net dont get fooled by MS stop gap laungage.


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    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 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 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…

    732 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

    20 Experts available now in Live!

    Get 1:1 Help Now