Hi frenzz...i am unable to work this out...
strTemp = "ResId = (SELECT RES_EUID FROM MSP_WEB_RESOURCES WHERE RES_NAME
LIKE '" + strUser + "') " +
"AND ProjID = " + projId + " ";
if (j == 0)
{
selectString = strTemp + "AND B_Date <= #" + currDate.ToShortDateString() +
"#";
cost = GetCostTillStartDate(costTable, currDate);
}
else
{
selectString = strTemp + "AND B_Date = #" + currDate.ToShortDateString() +
"#";
DataRow costTableCurrRow = costTable.Rows[costTableCount-1];
cost = (8 * Convert.ToInt32(costTableCurrRow["Cost",
DataRowVersion.Current]));
}
DataRow[] rowCol = cleanCstIvuTable.Select(selectString);
Till i don't give this nested SELECT
(SELECT RES_EUID FROM MSP_WEB_RESOURCES WHERE RES_NAME LIKE '" + strUser
+ "') "
all seems to be working fine.
But it fails with error when i use this ..where am i rong ???
Syntax error: Missing operand after 'RES_EUID' operator.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing
operand after 'RES_EUID' operator.
Source Error:
Line 535: cost = (8 * Convert.ToInt32(costTableCurrRow["Cost",
DataRowVersion.Current]));
Line 536: }
Line 537: rowCol = cleanCstIvuTable.Select(selectString);
Line 538: if (rowCol.Length > 0)
Line 539: {
Thanx,
Regards,
Rohit