740 |
|
protected |
741 |
|
FField: TField; |
742 |
|
FBlobStream: TIBBlobStream; |
743 |
+ |
function GetSize: Int64; override; |
744 |
|
public |
745 |
|
constructor Create(AField: TField; ABlobStream: TIBBlobStream; |
746 |
|
Mode: TBlobStreamMode); |
4678 |
|
DataSet.SetInternalSQLParams(Query, buff); |
4679 |
|
end; |
4680 |
|
|
4681 |
+ |
function TIBDSBlobStream.GetSize: Int64; |
4682 |
+ |
begin |
4683 |
+ |
Result := FBlobStream.BlobSize; |
4684 |
+ |
end; |
4685 |
+ |
|
4686 |
|
{ TIBDSBlobStream } |
4687 |
|
constructor TIBDSBlobStream.Create(AField: TField; ABlobStream: TIBBlobStream; |
4688 |
|
Mode: TBlobStreamMode); |
4691 |
|
FBlobStream := ABlobStream; |
4692 |
|
FBlobStream.Seek(0, soFromBeginning); |
4693 |
|
if (Mode = bmWrite) then |
4694 |
+ |
begin |
4695 |
|
FBlobStream.Truncate; |
4696 |
+ |
TIBCustomDataSet(FField.DataSet).RecordModified(True); |
4697 |
+ |
TBlobField(FField).Modified := true; |
4698 |
+ |
FHasWritten := true; |
4699 |
+ |
end; |
4700 |
|
end; |
4701 |
|
|
4702 |
|
destructor TIBDSBlobStream.Destroy; |