Subject | Re: [IBO] OnCalculateField: writing to calculated field of type blob throws AV |
---|---|
Author | Jason Wharton |
Post date | 2009-03-06T07:38:49Z |
I am not sure this should be a limitation. Looks more like a bug in IBO to
me.
It looks like it should be easy enough to fix.
Can you work around it for now?
Jason
me.
It looks like it should be easy enough to fix.
Can you work around it for now?
Jason
----- Original Message -----
From: "Markus Ostenried" <macnoz@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, March 05, 2009 4:36 AM
Subject: [IBO] OnCalculateField: writing to calculated field of type blob
throws AV
> 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