Hi
I am having problem locating, syntax error in the select statement, could some help out thanks
The code runs fine without the Where clause but once I add the where clause it throws an exception at the following line of codes, Please help
Dim dataAdapter As New OleDb.OleDbDataAdapter("SELECT EmpID,LastName,FirstName FROM EmployeeTbl where LastName = & txtLastName.Text' &", connectionstring)
dataAdapter.Fill(ds, "EmployeeTbl") <<Syntax error (missing operator) in query expression 'LastName = & txtLastName.Text' &'. DataGridViewCheckEmployee.DataSource = ds.Tables(0)
I am having problem locating, syntax error in the select statement, could some help out thanks
The code runs fine without the Where clause but once I add the where clause it throws an exception at the following line of codes, Please help
Quote:
Dim dataAdapter As New OleDb.OleDbDataAdapter("SELECT EmpID,LastName,FirstName FROM EmployeeTbl where LastName = & txtLastName.Text' &", connectionstring)
dataAdapter.Fill(ds, "EmployeeTbl") <<Syntax error (missing operator) in query expression 'LastName = & txtLastName.Text' &'. DataGridViewCheckEmployee.DataSource = ds.Tables(0)