Subject [IBO] Re: Storing PDF into Firebird Blobs
Author Terry Black
Thanks heaps


IT Manager | Public Health Unit Hornsby | Health Reform Transitional Organisation Northern
Hornsby Hospital, Main Building 1, 36-76 Palmerston Road, Hornsby NSW 2077
Tel. 02 9477 9400 | Fax. 02 9482 1650 | tblac@...

>>> Aage Johansen <aagjohan@...> 15/05/2012 4:02 am >>>
Terry wrote:
Could you please give me an idea of how to use it. You mentioned
using a prepared DSQL component?

It is very close to using the query components.
Here, MYDSQL is a TIB_DSQL component, with connection and transaction
properties set.

MYDSQL.SQL.Text:='insert into MYTABLE '+
'( ID, PICT, ...) '+
'values '+
'(:ID,:PICT, ...)';
MYDSQL.Prepare; // No longer really necessary
MYDSQL.ParamByName('ID' ).AsInteger:= ... ;

If the picture arrives via a memorystream you can use

Totally untested, of course.
TIB_DSQL is not used if you want to return rows from the
operation. In a pinch you can get a single value, as with "select
count(*) from MYTABLE".

Jason wrote:
CreateBlobStream( ) is what you use.
I haven't actually use this myself.

Aage J.

Disclaimer: This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender.

Views expressed in this message are those of the individual sender, and are not necessarily the views of the Local Health District or associated entities.