Cashmgmt
asked on
Nested if else statements giving error
I have the following nested if else statement and it keeps giving me the error that it has an illefal else without matching if . I've tried playing with the brackets and can't get it to work. Can someone point out where the problem is? Thanks in advance!
if (!bEndOfDay)
{
if (!MoveData(csTblName, csBlobTable, csBulkTable,pSqlDb))
{
update_detail("Error in moving data from ....");
uRetVal = FALSE;
}
else
{
if (g_SysCfg.IsVerbose())
update_detail("Data moved from to .....");
}
}
else
{
if (!MoveBulkData(csBulkTable,pSqlDb))
{
update_detail("Error in moving data from ....");
uRetVal = FALSE;
}
else
{
if (g_SysCfg.IsVerbose())
update_detail("Data moved from to .....");
}
}
else
{
if (!MoveAlertData(csAPAlertTable,pSqlDb))
{
update_detail("Error in moving data from ....");
uRetVal = FALSE;
}
else
{
if (g_SysCfg.IsVerbose())
update_detail("Data moved from to .....");
}
}
return uRetVal;
ASKER
Yeah, I see it and that's where the program is stopping when I try to build, but I'm new to programming and I can't figure out how to make the else that's causing the error part of the if (!bEndOfDay). can you help?
Well, that's pretty hard, since that's not a complete function and I have no idea what it is supposed to do ;o)
Well, is 'MoveAlertData()' supposed to execute when 'bEndOfDay' is 'true' or 'false' or under what other condition?
Well, is 'MoveAlertData()' supposed to execute when 'bEndOfDay' is 'true' or 'false' or under what other condition?
ASKER
if bEndOfDay is false, then i need it to do the MoveDate then MoveBulkDate then MoveAlertData
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You're absolutely right. So obvious and I didn't see it. Thanks, that worked!!!
Open in new window