How to check the database field if null then populate the grid cell with zero else with the value entered in the cell.
while not eof do
begin
grdDeal.Cells[0,iRow] := FieldByName('WORKBASKET_DESC').asString;
if ( FieldByName('PRODUCT_DEAL_NO').asString = null) then
grdDeal.Cells [1,iRow] := 0
else
grdDeal.Cells [1,iRow] := FieldByName('PRODUCT_DEAL_NO').asString;
grdDeal.Cells[2,iRow] := FieldByName('WORKBASKET_ID').asString;
inc(iRow);
Next;
end;
grdDeal.RowCount := iCount + 1;
end;
end;
Can anyone tell why the above query is returning an error to me.Kinldy tell me what is the correct syntax for the above statements.Please be fast.It should be delivered tomorrow.Thanks in advance
Software/Hardware used:
ASKED:
May 22, 2008 6:16 AM
UPDATED:
May 22, 2008 12:37 PM