Subject Re: [IBO] Re:Invalid Blob ID
Author Lester Caine
Johannes Pretorius wrote:

> Good day all
> =-0=-00-=-0==-0
>
> we have an odd error happening with IBObject 4.6A and Interbase 5.6
>
> //==== ERROR =================
> isc error code:335544329
>
> isc error message:
> invalid blob id
>
> statement:
> tib_statement: "<tapplication>.dm.qreports.iboqrqreports.<tib_updatesql>.<tib_statement>."
>
>
> statement:
> tibointernaldataset: "<tapplication>.dm.qreports.iboqrqreports."
> //= EINDE ===================
>
> We have noticed this previously and believed it had to do with the Template that is a
> blob field being pulled from a stored procedure and then copy with the function
>
> //=== FUnKSIE ================
> QReports.CreateBlobStream(QReports.FieldByName('REPORT'),bmWrite).CopyFrom(QTemplates.CreateBlobStream(QTemplates.FieldByName('TEMPLATE'),bmRead),QTemplates.CreateBlobStream(QTemplates.FieldByName('TEMPLATE'),bmRead).size);
>
> //=== EINDE ==================
>
> We then changed the code so that the Templates came from a Query and NOT a stored procedure and it seemed asif the problem has come back again.
>
> Notice that the problem happens when we try and SAVE the Qreports data.
>
> If anybody can give us some hints or idea's to start solving this problem please.
>
> Thanks in Advance

I've had this a couple of times in the past, and it was caused by duff
saves to the blob. I ended up just deleting the blob reference from
IB_SQL and creating a new record, but I suspect you are seeing something
slightly different. One possible 'cause' may be that the blob id's are
getting messed up.

Could you build the data for blob you want to save in memory and then
save the results, so you are not using multiple blob id's at the same time?

Bear in mind that 5.6 *IS* an old version of Interbase and I think the
errors I saw WERE probably from that time, so this may just be something
that was never fixed in Interbase!

--
Lester Caine - G8HFL
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.