I'm trying to search an employee record but i'm getting this error message:
An expression of non-boolean type specified in a context where a condition is expected, near 'OR'.
This is the code I'm using:
sConn = new SqlConnection(sStr);
daEmp2 = new SqlDataAdapter("
SELECT employee.*,
department.Department
FROM tblEmployee employee
INNER JOIN tblDepartment department ON employee.DeptID=department.DeptID
WHERE Lname OR Fname LIKE '%" + txtName.Text + "%'
", sConn);
dsEmp2 = new DataSet();
daEmp2.Fill(dsEmp2, "tblEmployee");
is there something wrong with my query?