Using cn As New SqlConnection cn.ConnectionString = " " cn.Open() Using cmd As New SqlCommand("GetBikeTypeToArray", cn) cmd.CommandType = CommandType.StoredProcedure
Dim dr As SqlDataReader = cmd.ExecuteReader Dim i As Integer Do While dr.Read For i = 0 To dr.FieldCount - 1 'lstResult.Items.Add(dr.GetName(i) & ":" & dr.Item(i)) Otem = dr.Item(i) tem.Add(Otem) Next Loop End Using End Using