Dim sqlconn As New SqlClient.SqlConnection(System.Configuration.ConfigurationManager.AppSettings("MYconn"))
Dim dr1 As SqlDataReader
Dim dr1cmd As New SqlCommand("You Sql here", sqlconn)
sqlconn.Open()
Try
dr1 = dr1cmd.ExecuteReader
Catch ex As System.Exception
End Try
While DR1.read
'do somthing
end while
sqlconn.Close()
sqlconn.Dispose()