do case case llCheckType=.t. and llCheckCat=.t. lcWhereCond="((type=2 and lsn_cat="+.VFP2SQL(csrDCIInfo.lsn_cat)+; ") or (type=3 and lessontype="+.VFP2SQL(csrDCIInfo.lessontype)+"))" case llCheckCat=.t. lcWhereCond="type=2 and lsn_cat="+.VFP2SQL(csrDCIInfo.lsn_cat) otherwise lcWhereCond="type=3 and lessontype="+.VFP2SQL(csrDCIInfo.lessontype) endcase select *; from csrMax4Sale; into cursor csrDCILimits NOFILTER; where start_time < ltEndTime and end_time > ltStartTime and &lcWhereCondSo, I found a few links on creating LINQ to datatable such as http://forums.asp.net/t/1150810.aspx for example.
if (condition 1) var query = .... else if (condition 2) var query = ...So, I somehow need to declare this query variable at the top to be able to re-use it. But this is a problem - I don't know how to declare it with the type. What this var query should be so I can use it in my code?