In InsertSQL statement, i.e. 'Insert Into TBMARGINS (WARE, MARGIN, DATUM) Values(:WARE, :MARGIN, :DATUM)',
:Ware, :Margin, :Datum are values from TDataSet (in this case TIBDataSet).
If datum and ware is unique, then define a unique index with those fields. Without index, your table may have many rows with the same Datum and Ware.
Or, you may define both UpdateSQL and InsertSQL as following:
Update or Insert Into TBMARGINS (WARE, MARGIN, DATUM) Values(:WARE, :MARGIN, :DATUM) Matching (Ware, Datum)