Subject | OnCalculateField: writing to calculated field of type blob throws AV |
---|---|
Author | Markus Ostenried |
Post date | 2009-03-05T11:36:03Z |
Hi all,
I have a TIB_Query with SQL
select * from rdb$database
Then I declared a calculated field like this:
blob_calc blob sub_type 0
procedure TForm1.IB_Query1CalculateField(Sender: TIB_Statement; ARow: TIB_Row;
AField: TIB_Column);
begin
if SameText(AField.FieldName, 'blob_calc') then
AField.Assign(TStringStream.Create('abc')); // <- AV here
end;
When I open the query I get an AV in ClearBlobNodeData.
Callstack follows:
IB_Session.pas | | ClearBlobNodeData
IB_Session.pas | | ClearBlobNodeData
IB_Components.pas | TIB_BlobStream | Initialize
IB_Components.pas | TIB_BlobStream | Initialize
IB_Components.pas | TIB_BlobStream | Create
IB_Components.pas | TIB_BlobStream | CreateForColumn
IB_Components.pas | TIB_BlobStream | CreateForColumn
IB_Components.pas | TIB_Statement | CreateBlobStream
IB_Components.pas | TIB_Statement | CreateBlobStream
IB_Components.pas | TIB_ColumnBlob | LoadFromStream
IB_Components.pas | TIB_ColumnBlob | LoadFromStream
IB_Components.pas | TIB_ColumnBlob | Assign
Unit1.pas | TForm1 | IB_Query1CalculateField
Using IBO 4.8.7 and D2007.
Question is: Is this a known limitation or am I doing something wrong here?
I'm using the calculated blob because I select compressed bitmap
images from the database and need to present them to ReportBuilder as
blobs containing uncompressed images.
TIA,
Markus
I have a TIB_Query with SQL
select * from rdb$database
Then I declared a calculated field like this:
blob_calc blob sub_type 0
procedure TForm1.IB_Query1CalculateField(Sender: TIB_Statement; ARow: TIB_Row;
AField: TIB_Column);
begin
if SameText(AField.FieldName, 'blob_calc') then
AField.Assign(TStringStream.Create('abc')); // <- AV here
end;
When I open the query I get an AV in ClearBlobNodeData.
Callstack follows:
IB_Session.pas | | ClearBlobNodeData
IB_Session.pas | | ClearBlobNodeData
IB_Components.pas | TIB_BlobStream | Initialize
IB_Components.pas | TIB_BlobStream | Initialize
IB_Components.pas | TIB_BlobStream | Create
IB_Components.pas | TIB_BlobStream | CreateForColumn
IB_Components.pas | TIB_BlobStream | CreateForColumn
IB_Components.pas | TIB_Statement | CreateBlobStream
IB_Components.pas | TIB_Statement | CreateBlobStream
IB_Components.pas | TIB_ColumnBlob | LoadFromStream
IB_Components.pas | TIB_ColumnBlob | LoadFromStream
IB_Components.pas | TIB_ColumnBlob | Assign
Unit1.pas | TForm1 | IB_Query1CalculateField
Using IBO 4.8.7 and D2007.
Question is: Is this a known limitation or am I doing something wrong here?
I'm using the calculated blob because I select compressed bitmap
images from the database and need to present them to ReportBuilder as
blobs containing uncompressed images.
TIA,
Markus