procedure TFrm0121.edtInCard(Sender: TObject);
var
Total,Sale : Real;
begin
With Query1 do
begin
Close;
Sql.Clear;
Sql.Text := 'select Card_No,Card_Name from MEMBER'+
'where Card_No =: PCard_No'+
' and Card_Name =: PCard_Na';
ParamByName('PCard_No').asstring := edit2.text;
ParamByName('PCard_Name').asstring := edit1.text;
ParamByName('PCard_Name').asstring := edit3.text;
Open;
Close;
end;
With Query1 do
begin
Close;
Sql.Clear;
Sql.add ('select * from SANG');
Open;
// 구매금액계산
// Sale := 수량 * 단가
// Total := Total + sale
Sale := FieldByName('Sang_Su').asstring * FieldByName('Sang_Dan').asstring;
Total := Total + Sale;
FieldByName('Sang_Gu').asstring := Sale ;
FieldByName('Sang_Hanp').asstring := Total;
DBGrid1.Columns[0].Field := Table1.FieldByName('Sang_Name');
DBGrid1.Columns[1].Field := Table1.FieldByName('Sang_Dan');
DBGrid1.Columns[2].Field := Table1.FieldByName('Sang_Su');
DBGrid1.Columns[3].Field := Table1.FieldByName('Sang_Gu');
DBGrid1.Columns[4].Field := Table1.FieldByName('Sang_Hap');
Close;
end;
end;
위의 에러좀 잡아주세요..
부탁합니다..
더운데..수고좀 해주십시요.....감사합니다.