Here is an example of what I'm trying:
Dim cmd7 As New SqlCommand("Select CustomerName, ShipToAddress1, ShipToAddress2, ShipToCity, ShipToState, ShipToZip, ShipToCountry FROM CustomerList Where CustomerID = @CustomerID and DivisionID = 'TWD'", con)
cmd7.Parameters.Add("@CustomerID", SqlDbType.VarChar).Value = cboCustomer.Text
If con.State = ConnectionState.Closed Then con.Open()
Dim reader As SqlDataReader
reader = cmd7.ExecuteReader()
While reader.Read()
txtCustomer.Text = reader("CustomerName").ToString()
End While
reader.Close()
con.Close()
I go into debug mode and its just passing over my while statement and never goes in and makes txtcustomer.text = reader("CustomerName").Tostring(). Why is this happening!?