I am trying to display data from an Access database using ADO Data Controls and the DataCombo + DataGrid controls. In the ADODC properties box, I setup up the following:
ConnectionString: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\anyDB.mdb;
RecordSource: SELECT * FROM Customers WHERE LastName = 'Smith'
My problem is that I always get the error: "Syntax Error in WHERE clause". When I change the RecordSource to the following:"SELECT * FROM Customers WHERE Age = 22", it works. So for some reason, it doesn't work only when I have text in the WHERE clause. Can anyone tell me how to correct this error. Thanks,
Chamira.
ConnectionString: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\anyDB.mdb;
RecordSource: SELECT * FROM Customers WHERE LastName = 'Smith'
My problem is that I always get the error: "Syntax Error in WHERE clause". When I change the RecordSource to the following:"SELECT * FROM Customers WHERE Age = 22", it works. So for some reason, it doesn't work only when I have text in the WHERE clause. Can anyone tell me how to correct this error. Thanks,
Chamira.