But Guys still it is Displaying an error, the error is "Syntax error (missing operator) in query expression 'TransDate = 2012-09-20 12:00:00 a.m'
But I Changed the DateTimePicker format to "short" and Value as per short like "2012-09-20" But still when i press the search button it gives the
error. Guys am linking this with access, So um still stuck with this. Need help. Sorry for late message was busy with work, Boss is headache.Nyways Thanks for all replies =)
*****This is the code for search button
private void butSearchS_Click(object sender, EventArgs e)
{
OleDbConnection CONN = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; DataSource=C:\\JohnFord.accdb;Persist Security Info=False;");
DataTable DAT = new DataTable();
OleDbDataAdapter DAA = new OleDbDataAdapter("SELECT * FROM MIS WHERE TransDate = " + (SearchDateS.Value), CONN);
DAA.Fill(DAT);
dataGrid1.DataSource = DAT;
}