Guest User

Untitled

a guest
Jul 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. OleDbDataAdapter dataAdapter = new OleDbDataAdapter(
  2. "SELECT accounts.ID, uname, firstname, lastname, description FROM accounts, profiles " +
  3. "WHERE accounts.ID = profiles.ID AND uname like '*@uname*'", connection);
  4. dataAdapter.SelectCommand.Parameters.Add("@uname", OleDbType.VarChar).Value = tbxFilter.Text;
  5.  
  6. WHERE accounts.ID = profiles.ID AND uname like @uname
  7.  
  8. dataAdapter.SelectCommand.Parameters.Add("@uname", OleDbType.VarChar).Value = "%" + tbxFilter.Text + "%"
  9.  
  10. dataAdapter.SelectCommand.Parameters.Add("@uname", OleDbType.VarChar).Value = "*" + tbxFilter.Text + "*".
  11.  
  12. tbxFilter.Text.Replace("'", "''")
Add Comment
Please, Sign In to add comment