im super newbie in pda development. i've got this:
VB Code:
  1. Imports System.Data.SqlClient
  2.  
  3. Public Class Form1
  4.     Inherits System.Windows.Forms.Form
  5.     Friend WithEvents Button1 As System.Windows.Forms.Button
  6.     Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
  7.  
  8. #Region " Windows Form Designer generated code "
  9.  
  10.     Public Sub New()
  11.         MyBase.New()
  12.  
  13.         'This call is required by the Windows Form Designer.
  14.         InitializeComponent()
  15.  
  16.         'Add any initialization after the InitializeComponent() call
  17.  
  18.     End Sub
  19.  
  20.     'Form overrides dispose to clean up the component list.
  21.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  22.         MyBase.Dispose(disposing)
  23.     End Sub
  24.  
  25.     'NOTE: The following procedure is required by the Windows Form Designer
  26.     'It can be modified using the Windows Form Designer.  
  27.     'Do not modify it using the code editor.
  28.     Friend WithEvents Label1 As System.Windows.Forms.Label
  29.     Friend WithEvents Label2 As System.Windows.Forms.Label
  30.     Private Sub InitializeComponent()
  31.         Me.MainMenu1 = New System.Windows.Forms.MainMenu
  32.         Me.Button1 = New System.Windows.Forms.Button
  33.         Me.Label1 = New System.Windows.Forms.Label
  34.         Me.Label2 = New System.Windows.Forms.Label
  35.         '
  36.         'Button1
  37.         '
  38.         Me.Button1.Location = New System.Drawing.Point(72, 200)
  39.         Me.Button1.Size = New System.Drawing.Size(80, 24)
  40.         Me.Button1.Text = "Button1"
  41.         '
  42.         'Label1
  43.         '
  44.         Me.Label1.Location = New System.Drawing.Point(64, 64)
  45.         Me.Label1.Text = "Label1"
  46.         '
  47.         'Label2
  48.         '
  49.         Me.Label2.Location = New System.Drawing.Point(64, 96)
  50.         Me.Label2.Text = "Label2"
  51.         '
  52.         'Form1
  53.         '
  54.         Me.Controls.Add(Me.Label2)
  55.         Me.Controls.Add(Me.Label1)
  56.         Me.Controls.Add(Me.Button1)
  57.         Me.Menu = Me.MainMenu1
  58.         Me.Text = "Form1"
  59.  
  60.     End Sub
  61.  
  62. #End Region
  63.  
  64.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  65.  
  66.         Dim connectionString As String
  67.         Dim SQL As String
  68.         Dim tmpName As String
  69.         Dim tmpCode As String
  70.  
  71.         connectionString = "Server=SQLOLEDB.1; Data Source=DIEVECHNOLOGY; " & _
  72.                            "Database=test; User ID=sa; Password=;"
  73.  
  74.         Dim conDB As New SqlConnection(connectionString)
  75.         SQL = "Select Name, Code from Customers"
  76.  
  77.         Dim comSQL As New SqlCommand(SQL, conDB)
  78.         Dim DR As SqlDataReader
  79.  
  80.         Try
  81.             conDB.Open()
  82.             DR = comSQL.ExecuteReader(CommandBehavior.Default)
  83.  
  84.             While DR.Read
  85.                 tmpName = DR.GetString(0)
  86.                 tmpCode = DR.GetValue(1)
  87.                 Label1.Text = tmpName
  88.                 Label2.Text = tmpCode
  89.             End While
  90.  
  91.             DR.Close()
  92.         Catch ex As Exception
  93.             MessageBox.Show(Err.Description.ToString)
  94.         Finally
  95.             conDB.Close()
  96.         End Try
  97.  
  98.     End Sub
  99. End Class

anyone got the idea of wat's going on code above?