If I understand your question correctly, the query doesn't return rows.
If this is the case, place a breakpoint on
da1.Fill(ds, "Finaldetails");
Using debugger, investigate:
- Does the query look correct in da1.SelectCommand, see
OleDbDataAdapter.SelectCommand Property (System.Data.OleDb)[
^]
- When you execute the fill investigate, does the datatable in the dataset contain any rows.
If needed you can go through these tutorial:
-
Debugging in Visual Studio[
^]
-
Navigating through Code with the Debugger[
^]
Also you have tried the parameters and once you get the query working correctly, I suggest utilizing the parameters again. At the moment you're vulnerable to SQL injections and you're making assumptions about the server side date format.