Create the command
Use Parameters (?) in command text
Add parameters to command (convert to matching data type)
Fill table
Use Table for data binding
I did no tests with a real database, but it should help you to start.
Dont forget to add error handling!
Here's a sample code:
using (OleDbConnection conn = new OleDbConnection("CONNECTIONSTRING"))
{
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT [tblTimesheetDetails].[EmployeeID], [tblTimesheetDetails].[TSProjectCodeID], [tblTimesheetDetails].[TimeSheetDate], [tblTimesheetDetails].[HoursWorked] FROM [tblTimeSheetDetails] where EmployeeID=? AND TimeSheetDate BETWEEN ? AND ?";
cmd.CommandType = CommandType.Text;
cmd.Parameters.Add(new OleDbParameter("p1", int.Parse(statuslblUsername.Text)));
cmd.Parameters.Add(new OleDbParameter("p2", DateTime.Parse(mondaydate.Text)));
cmd.Parameters.Add(new OleDbParameter("p3", DateTime.Parse(sundaydate.Text)));
conn.Open();
DataTable timeEntries = new DataTable("tbl");
timeEntries.Load(cmd.ExecuteReader(CommandBehavior.CloseConnection));
dataGridView1.DataSource = timeEntries;
}