I have the following c# code and I want to click on Search and be able to search by lastname
OleDbConnection cnn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\srye\Desktop\Report_SendInMailBody\Employee Database Merge.accdb");
DataTable ds = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter(@"SELECT [FirstName], [LastName], [JobTitle], [Employee Email],[Manager], [Managers Email], [Location], [Status]
FROM tblExsitingEEs where tblExsitingEEs.[LastName]= " + (txtSearch.Text), cnn);
da.Fill(ds);
dataGridView1.DataSource = ds;
When I run this I get an error saying there is a missing parameter if I remove the where clause and it works but I get all employees, I want to be able to do a search where the where clause has the lastname= or lastname like
How can I do this with C# in a windows form I have created in C# using MS-access?
shawnrye