Danke nun läufts.
konnte das ganze so lösen.
Delphi-Quellcode:
DM_bibeladmin.Art_value.close;
DM_bibeladmin.Art_value.SelectSQL.Clear;
DM_bibeladmin.Art_value.SelectSQL.Add('SELECT SUM(IN_COUNT) as summe FROM BIBEL_ART_D WHERE '+
'(( ID_ART = :ID) AND ( I_O = 1))');
DM_bibeladmin.Art_value.Active := True;
if DM_bibeladmin.Art_value.FieldByName('Summe').IsNull
then i := 0
else i := strtoInt (DM_bibeladmin.Art_value.FieldByName('Summe').Value) ;
//
//
DM_bibeladmin.Art_value.close;
DM_bibeladmin.Art_value.SelectSQL.Clear;
DM_bibeladmin.Art_value.SelectSQL.Add('SELECT SUM(OUT_COUNT) as summe FROM BIBEL_ART_D WHERE '+
'(( ID_ART = :ID) AND ( I_O = 0))');
DM_bibeladmin.Art_value.Active := True;
if DM_bibeladmin.Art_value.FieldByName('Summe').IsNull
then o := 0
else o := strtoInt (DM_bibeladmin.Art_value.FieldByName('Summe').Value) ;
//
//
c := i - o;
DM_bibeladmin.Bibel_Art.Edit;
DM_bibeladmin.Bibel_Art.FieldByName('STOCK').Value := c ;
DM_bibeladmin.Bibel_Art.CommitUpdToCach;
end;
Shalom
Manfred