H
How to execute query fast within multile
hi there.
i am developing a web application in C# with Access Database.
i and using 5 inner loops for executing multiple sql query for calucate
group by sum from my fifferent-2 transactions table. means my loops is
running 16000 times or more. it is taking a to much time for exucuting all
the query.
actually i have also used temporary datatable for this perpose after fill
all data in this temporary table.
like
DataTable
dtAllRecord;
dtAllRecord =
FillDataTable();
object sumObjectQty;
sumObjectQty = dtAllRecord.Compute(
"Sum(TotalPieces)", "Trans_Date<#" + strDatestart + "# and Type='Op' and
WH_ID = '" + tempWhlist[w1].WarehouseID + "' and Product_ID = '" +
strProductId + "' and Thickness_JointValue = '" +
tempThicklist[t1].JointValue + "' and Width_JointValue = '" +
tempWidthList[t2].JointValue + "' and Length_JointValue = '" +
tempLengthlist[t3].JointValue + "' and Grade_ID ='" +
tempGradelist[t4].GradeID + "' and Trans_ID LIKE '%" + TempCategnameOpStock +
"%'");
is there any other way to fast execution of query.
thanks in advance
(e-mail address removed)
i am developing a web application in C# with Access Database.
i and using 5 inner loops for executing multiple sql query for calucate
group by sum from my fifferent-2 transactions table. means my loops is
running 16000 times or more. it is taking a to much time for exucuting all
the query.
actually i have also used temporary datatable for this perpose after fill
all data in this temporary table.
like
DataTable
dtAllRecord;
dtAllRecord =
FillDataTable();
object sumObjectQty;
sumObjectQty = dtAllRecord.Compute(
"Sum(TotalPieces)", "Trans_Date<#" + strDatestart + "# and Type='Op' and
WH_ID = '" + tempWhlist[w1].WarehouseID + "' and Product_ID = '" +
strProductId + "' and Thickness_JointValue = '" +
tempThicklist[t1].JointValue + "' and Width_JointValue = '" +
tempWidthList[t2].JointValue + "' and Length_JointValue = '" +
tempLengthlist[t3].JointValue + "' and Grade_ID ='" +
tempGradelist[t4].GradeID + "' and Trans_ID LIKE '%" + TempCategnameOpStock +
"%'");
is there any other way to fast execution of query.
thanks in advance
(e-mail address removed)