SHARE
TWEET

Untitled

a guest Jul 19th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. try
  2.         {
  3.             string quer = "SELECT * FROM inventario WHERE nombreProducto LIKE 'd%';";
  4.             SQLiteConnection conexion = new SQLiteConnection("Data Source = StoreDB.db; Version = 3; New = False; Compress = True;");
  5.             conexion.Open();
  6.             SQLiteCommand cmd = new SQLiteCommand(quer, conexion);
  7.             //cmd.Parameters.Add(new SQLiteParameter("@val", buscador.Text));
  8.             SQLiteDataReader result = cmd.ExecuteReader();
  9.             if (result.HasRows)
  10.             {
  11.                 while (result.Read())
  12.                 {
  13.                     artic1.Text = result.GetValue();
  14.                 }
  15.             }
  16.             conexion.Close();
  17.         }
  18.         catch (Exception ex)
  19.         {
  20.             MessageBox.Show("Error" + ex);
  21.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top