Hi Dear Chris Strug,
here is one sample:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim oSQLConn As SqlConnection = New SqlConnection
oSQLConn.ConnectionString = "Data Source=(local);Initial
Catalog=pubs;Integrated Security=SSPI;"
Dim oSQLCommand As SqlCommand
Try
If oSQLConn.State = ConnectionState.Closed Then
oSQLConn.Open()
End If
oSQLCommand = New SqlCommand("Select * from Authors", oSQLConn)
Dim oSQLDataReader As SqlDataReader
oSQLDataReader = oSQLCommand.ExecuteReader
While (oSQLDataReader.Read())
Me.ListBox1.Items.Add(oSQLDataReader("au_lname") & " " &
oSQLDataReader("au_fname"))
End While
Catch
Finally
oSQLCommand.Dispose()
If oSQLConn.State = ConnectionState.Open Then
oSQLConn.Close()
''oSQLConn.Dispose()
End If
End Try
End Sub
here are some useful links
==================
http://msdn.microsoft.com/library/de...tringTopic.asp
http://support.microsoft.com/default...b;en-us;313482