Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OleDbDataAdapter dataAdapter = new OleDbDataAdapter(
- "SELECT accounts.ID, uname, firstname, lastname, description FROM accounts, profiles " +
- "WHERE accounts.ID = profiles.ID AND uname like '*@uname*'", connection);
- dataAdapter.SelectCommand.Parameters.Add("@uname", OleDbType.VarChar).Value = tbxFilter.Text;
- WHERE accounts.ID = profiles.ID AND uname like @uname
- dataAdapter.SelectCommand.Parameters.Add("@uname", OleDbType.VarChar).Value = "%" + tbxFilter.Text + "%"
- dataAdapter.SelectCommand.Parameters.Add("@uname", OleDbType.VarChar).Value = "*" + tbxFilter.Text + "*".
- tbxFilter.Text.Replace("'", "''")
Add Comment
Please, Sign In to add comment