Subject | Re: [IBO] Re: Storing PDF into Firebird Blobs |
---|---|
Author | Terry Black |
Post date | 2012-05-14T11:47:17Z |
Hi, thanks for the information. I am familiar with the TIB_Query component
e.g
DM.qrEIRA.close; {resort the table for idno, so record is at top}
DM.qrEIRA.SQL.Clear;
DM.qrEIRA.SQL.Add('select * from EHO ORDER BY Idno DESC');
DM.qrEIRA.open;
or if you are using parameters
DM.qrEIRA.Close;
DM.qrEIRA.SQL.LoadFromFile(MemoPath + '\' + 'GroupLink.txt');
DM.qrEIRA.ParamByName('LINK').Value := GLink;
DM.qrEIRA.Prepare;
DM.qrEIRA.Open;
but I have never used the DSQL component before.
Could you please give me an idea of how to use it. You mentioned using a prepared DSQL component?
Terry
Terry Black
IT Manager
Northern Sydney Central Coast
Public Health Unit (Hornsby Office)
Blob would be Sub_type 0. I have had a look at some of the code used
in some earlier examples.
Do I have to use the TIB_Dataset>createBlobStream method?
Could someone please give me an example of the code I should use.
Lets assume I have a PDF file at c:\xyz.pdf how would I read this into a blob?
dsqlPICTURE.ParamByName('PICT').LoadFromFile('C:\XYZ.pdf');
--
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.
e.g
DM.qrEIRA.close; {resort the table for idno, so record is at top}
DM.qrEIRA.SQL.Clear;
DM.qrEIRA.SQL.Add('select * from EHO ORDER BY Idno DESC');
DM.qrEIRA.open;
or if you are using parameters
DM.qrEIRA.Close;
DM.qrEIRA.SQL.LoadFromFile(MemoPath + '\' + 'GroupLink.txt');
DM.qrEIRA.ParamByName('LINK').Value := GLink;
DM.qrEIRA.Prepare;
DM.qrEIRA.Open;
but I have never used the DSQL component before.
Could you please give me an idea of how to use it. You mentioned using a prepared DSQL component?
Terry
Terry Black
IT Manager
Northern Sydney Central Coast
Public Health Unit (Hornsby Office)
>>> Aage Johansen <aagjohan@...> 14/05/12 3:57 AM >>>Terry wrote
>>Hi, I want to store PDF files into Firebird BLOBs. I assume that the
Blob would be Sub_type 0. I have had a look at some of the code used
in some earlier examples.
Do I have to use the TIB_Dataset>createBlobStream method?
Could someone please give me an example of the code I should use.
Lets assume I have a PDF file at c:\xyz.pdf how would I read this into a blob?
>>With a prepared DSQL component you can use somethinglike:
dsqlPICTURE.ParamByName('PICT').LoadFromFile('C:\XYZ.pdf');
--
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.