If I understand what you want to do, you want to populate the DataSet using the OleDb adapter for MS Access, and then filter out this DataSet with the request from above. It is right?
If so, then the date columns in the returned DataSet should contain DateTime types, and you should be able to simply query the DataSet using LINQ. Click here for an ADO.NET blog article on how to do this.
Your LINQ expression will look something like this:
var query = from r in MyDataSet.Tables["LicenseDetails"].AsEnumerable() where r.Field<DateTime>("Date_of_Installation") >= new DateTime(6,8,2009,13,31,10) && r.Field<DateTime>("Date_of_Installation") <= new DateTime(10,9,2009,14,54,57) select r;
FYI instr(1,"+ArgName+",'" + Value + "') returns int, which is the Value position in ArgName, starting at position 1, or zero if it is not found. If this data is passed as string literals, they will simply return zero, which is probably interpreted as false in the Where clause and does not return any results. If you want to get the position of a string inside another in C #, use string.IndexOf() , if you want to find out if one string contains another, use string.Contains() Also note that between..and in Access includes start / end points, like LINQ above.
source share