Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void BuscarCalleRegCliente()
- {
- lsbxCallesRegCliente.Items.Clear();
- MySqlConnection conex = ConexionBD.conexionDevuelve();
- conex.Open();
- string query = "Select nomCalle from calles where nomCalle like'%" + txtNomCalleRegCliente.Text + "%'";
- using (MySqlCommand com = new MySqlCommand(query, conex))
- {
- using (MySqlDataReader red = com.ExecuteReader())
- {
- while (red.Read())
- {
- lsbxCallesRegCliente.Items.Add(red[0].ToString());
- }
- red.Close();
- }
- }
- }
Add Comment
Please, Sign In to add comment