I'm a VB6 developer myself mostly, and am just starting with .Net
I've no formal training in .Net whatsoever, but have just forged ahead and tried to write an application.

Is there anything really wrong or stupid with this app so far?
i.e. dodgy coding practices that have carreid over from vb6 etc. ?

Form1.vb
VB Code:
  1. Imports System.Data.SqlClient
  2.  
  3. Public Class Form1
  4.  
  5.     Inherits System.Windows.Forms.Form
  6.     Private WithEvents mySqlConnection As sqlConnection
  7.     Private mySQLReader As SqlDataReader
  8.     Private blnHaveCleared As Boolean = False
  9.     Private lngLineCount As Long, lngCurrLine As Long
  10.     Private colHeaders As New Collection()
  11.  
  12. #Region " Windows Form Designer generated code "
  13.    . . . just adds a listbox and a button
  14. #End Region
  15.  
  16.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  17.  
  18.     End Sub
  19.  
  20.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  21.         mySqlConnection = New SqlConnection("Integrated Security=SSPI;Persist Security Info=False;User ID=usrShop;Initial Catalog=dbShop;Data Source=JAMIETOSH;")
  22.         mySqlConnection.Open()
  23.     End Sub
  24.  
  25.     Private Sub mySqlConnection_StateChange(ByVal sender As Object, ByVal e As System.Data.StateChangeEventArgs) Handles mySqlConnection.StateChange
  26.         If e.CurrentState = ConnectionState.Open Then
  27.             Dim intFileNumber As Integer = FreeFile(), strFileContent As String
  28.             Dim strArr() As String, strFields() As String
  29.             Dim strHeaders() As String, lngColIndex As Long, i As Long
  30.             FileOpen(intFileNumber, "c:\test.txt", OpenMode.Input)
  31.             strFileContent = InputString(intFileNumber, LOF(intFileNumber))
  32.             strArr = Split(strFileContent, vbCrLf)
  33.             lngLineCount = UBound(strArr)
  34.             For lngCurrLine = 0 To 100 'lngLineCount
  35.                 If Not lngCurrLine = 0 Then
  36.                     strFields = Split(strArr(lngCurrLine), vbTab)
  37.                     sqlAddHeaders(strFields(1), strFields(0), mySqlConnection)
  38.                     'sqlAddProductToDB(strArr(lngCurrLine), mySqlConnection)
  39.                 End If
  40.             Next
  41.             FileClose(intFileNumber)
  42.             mySqlConnection.Close()
  43.         End If
  44.     End Sub
  45.  
  46. End Class