Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Visual Basic 6 to VB.NET advice (desktop apps) !

Posted on 2008-10-09
4
Medium Priority
?
251 Views
Last Modified: 2013-11-26
Are there many hurdles to overcome moving to .NET.  Im fine with OO coding as i have used java before.  In VB6/VBA i was using DAO to access databases and compiling to an exectuable was easy for distribution my questions are:

What access methods are availble/recommended in .NET for database access / reading in csv files?
How easy is it to compile all classes and code into a exectuable for distribution?
Is UserIntfaces just as easy to setup ie drag and drop

Your help is much appreaciated

Dave
0
Comment
Question by:david_88
[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
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 22677529
In vb.net, there is a new technology, called ado.net for interaction with a database.
http://www.aspfree.com/c/a/.NET/An-introduction-to-ADONET/
http://www.startvbdotnet.com/ado/default.aspx
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 1000 total points
ID: 22677543
>> How easy is it to compile all classes and code into a exectuable for distribution?
Deploying applications
http://www.startvbdotnet.com/extras/deploy.aspx

>> UserIntfaces just as easy to setup ie drag and drop
Almost the same way of working like vb6
0
 
LVL 2

Assisted Solution

by:MTEXX
MTEXX earned 1000 total points
ID: 22679307
Here's a quick CSV reader I use.
Notice it is simply a shared (read static in VB6) function in a class.  EVERYTHING in .net is in a class.
Imports System.IO
 
Public Class Csv
    ''' <summary>
    ''' Reads a CSV formatted file and returns a two-dimensional non-jagged array.
    ''' </summary>
    ''' <param name="filespec">The file to read.</param>
    ''' <param name="performTrim">If enabled, fields are trimmed after parsing.</param>
    ''' <param name="remark">A remark token, usually "'" or "REM"</param>
    ''' <returns>A two-dimensional non-jagged array of strings.</returns>
    ''' <remarks></remarks>
    Public Shared Function read(ByVal filespec As String, Optional ByVal performTrim As Boolean = True, Optional ByVal remark As String = Nothing) As String()()
        Dim content As String
        Dim sReader As StreamReader
        Try
            sReader = New StreamReader(filespec)
            content = sReader.ReadToEnd()
            sReader.Close()
        Catch Ex As Exception
            Return Nothing
        End Try
 
        Dim lines() As String = content.Split(vbCrLf)
        Dim retval(0)() As String
        Dim firstFlag As Boolean = True
 
        For i As Integer = LBound(lines) To UBound(lines)
            If (lines(i) = "") Then Continue For
            If (remark IsNot Nothing AndAlso remark <> "" AndAlso lines(i).Trim.StartsWith(remark)) Then Continue For
            Dim words() As String = lines(i).Split(",")
            If (performTrim) Then
                For j As Integer = LBound(words) To UBound(words)
                    words(j) = words(j).Trim
                Next
            End If
            If (firstFlag) Then
                firstFlag = False
            Else
                ReDim Preserve retval(UBound(retval) + 1)
            End If
            retval(UBound(retval)) = words
        Next
        Return retval
    End Function
End Class

Open in new window

0
 

Author Closing Comment

by:david_88
ID: 31504604
Brilliant just what i need thanks
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 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