41 |
|
|
42 |
|
TIBUpdate = class(TIBDataSetUpdateObject) |
43 |
|
private |
44 |
– |
FDataSet: TIBCustomDataSet; |
44 |
|
FDummySQL: TStrings; |
45 |
|
FOnApplyUpdates: TOnApplyUpdates; |
46 |
|
protected |
47 |
|
function GetSQL(UpdateKind: TUpdateKind): TStrings; override; |
48 |
< |
function GetDataSet: TIBCustomDataSet; override; |
50 |
< |
procedure SetDataSet(ADataSet: TIBCustomDataSet); override; |
51 |
< |
procedure Apply(UpdateKind: TUpdateKind; buff: PChar); override; |
48 |
> |
procedure Apply(UpdateKind: TUpdateKind; buff: TRecordBuffer); override; |
49 |
|
public |
50 |
|
constructor Create(AOwner: TComponent); override; |
51 |
|
destructor Destroy; override; |
246 |
|
|
247 |
|
function TParamIntf.GetAsBoolean: boolean; |
248 |
|
begin |
249 |
< |
Result := FOwner.FParams[FIndex].Value; |
249 |
> |
if VarIsNull(FOwner.FParams[FIndex].Value) then |
250 |
> |
Result := false |
251 |
> |
else |
252 |
> |
Result := FOwner.FParams[FIndex].Value; |
253 |
|
end; |
254 |
|
|
255 |
|
function TParamIntf.GetAsCurrency: Currency; |
776 |
|
Result := FDummySQL; {non empty result} |
777 |
|
end; |
778 |
|
|
779 |
< |
function TIBUpdate.GetDataSet: TIBCustomDataSet; |
780 |
< |
begin |
781 |
< |
Result := FDataSet; |
782 |
< |
end; |
783 |
< |
|
784 |
< |
procedure TIBUpdate.SetDataSet(ADataSet: TIBCustomDataSet); |
785 |
< |
begin |
786 |
< |
FDataSet := ADataset; |
787 |
< |
end; |
788 |
< |
|
789 |
< |
procedure TIBUpdate.Apply(UpdateKind: TUpdateKind; buff: PChar); |
779 |
> |
procedure TIBUpdate.Apply(UpdateKind: TUpdateKind; buff: TRecordBuffer); |
780 |
|
var Params: ISQLParams; |
781 |
|
begin |
782 |
|
Params := TParamListIntf.Create(Dataset.Fields,(DataSet.Database as TIBDatabase)); |