Guest User

Untitled

a guest
Jan 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. private void BuscarCalleRegCliente()
  2. {
  3. lsbxCallesRegCliente.Items.Clear();
  4. MySqlConnection conex = ConexionBD.conexionDevuelve();
  5. conex.Open();
  6. string query = "Select nomCalle from calles where nomCalle like'%" + txtNomCalleRegCliente.Text + "%'";
  7. using (MySqlCommand com = new MySqlCommand(query, conex))
  8. {
  9. using (MySqlDataReader red = com.ExecuteReader())
  10. {
  11. while (red.Read())
  12. {
  13. lsbxCallesRegCliente.Items.Add(red[0].ToString());
  14. }
  15. red.Close();
  16. }
  17. }
  18. }
Add Comment
Please, Sign In to add comment