Dim query As String = "SELECT * FROM tabla" Try Dim con As New SqlConnection(conex) con.Open() Dim cmd As New SqlCommand(query, con) Dim dr As SqlDataReader = cmd.ExecuteReader() While dr.Read Dim id As String = dr.GetValue(0).ToString.Trim Dim name As String = dr.GetValue(1).ToString.Trim Dim code As String = dr.GetValue(2).ToString.Trim End While dr.Close() con.Close() Catch ex As Exception End Try
No hay comentarios.:
Publicar un comentario