У меня есть страница входа в систему с идентификатором клиента и контактным номером. После входа в систему мне нужно отобразить данные клиента, который входит в систему на предыдущей странице, а именно: CustomerID, CustomerName, Gender, Phone, Email. У меня уже есть база данных для клиентов. Ниже мой код
`
Dim connection As New SqlConnection
Dim command As New SqlCommand
Dim reader As SqlDataReader
connection.ConnectionString = "Data Source=LAPTOP-5E4GSPTU;Initial Catalog=VBN Assignment;Integrated Security=True"
connection.Open()
command.Connection = connection
command.CommandText = "select * CustomerID, CustomerName, Gender, PhoneNumber, EmailAddress from CustomerRegistration"
reader = command.ExecuteReader
If reader.HasRows Then
reader.Read()
TextBox1.Text = reader.Item("CustomerID")
TextBox2.Text = reader.Item("CustomerName")
ComboBox1.Text = reader.Item("Gender")
TextBox3.Text = reader.Item("PhoneNumber")
TextBox4.Text = reader.Item("EmailAddress")
reader.Close()
End If
connection.Close()`