Bill Tom
That is a solution, me myself prefere to just record the loaction of the
file in mt my DB.
As always there are many ways to .....
 
 

Gunnar Ekblad

Kontema IT AB

Hästholmsvägen 32

131 30 Nacka

Sweden

 

-----Ursprungligt meddelande-----
Från: [email protected] [mailto:[email protected]] För Bill Downall
Skickat: den 11 mars 2009 17:53
Till: RBASE-L Mailing List
Ämne: [RBASE-L] - Re: Saving PDFs to Database


Tom, 

The steps could be:
1) Print to file
2) Insert into table or update table with BLOB bracketed and quoted file
name syntax
3) Delete the file from disk

PRINT ... OPTION PDF +
|FILENAME myFile.PDF +
|(all your security options and settings


INSERT INTO reportsTable (rptDescrip, rptStored, fkLinkTodata, fileContent)
+
  VALUES ('Weekly update', .#NOW, .vDataID, ['myfile.pdf'])


-- or


UPDATE reportsTable SET fileContent = ['myfile.pdf'] +
WHERE idcolumn = whatever


DELETE myfile.pdf

But of course, your program will be generating a file name, so you may need
to do this:

SET VAR vFileName = (whatever)
SET VAR vDescrip = (whateverelse)

PRINT ... OPTION PDF +
|FILENAME &vFileName +
|(all your security options and settings


SET VAR vCommand = + 
('INSERT INTO reportsTable (rptDescrip, rptStored, fkLinkTodata,
fileContent) VALUES (' & +
'''' + .vDescrip + '''' + ',' & '''' + ctxt(.#now) + '''' & +
',' & ctxt(.vDataId) + ',' & '[''' + .vFileName + '''])'


&vCommand

DELETE .vFileName


Bill

On Wed, Mar 11, 2009 at 12:27 PM, Tom Frederick <[email protected]>
wrote:


I am trying to automatically save PDFs to a database table as part of the
print option. Converting reports to uneditable PDFs (Primo, RBase, and
Acrobat) all load to a directory. There will eventually be thousands of
these PDF reports and I would rather place these in a Report table that
meets HIPAA access requirements, simplifies backup, and (I hope) would make
retrieval easy with a simple menu/scroll/ID# system. Looked at other
formats, PDF’s method of locking the format and data seems to be what I
need.

 

1. The manual toolbar loading process works, but automating would be far
simpler and eliminates many problems. How to automatically load the PDF has
got me stumped right now. 

 

2. Once the PDF is in the table (by whatever means) I can get it and print
it. The R:Base PDF reader works great for directory based PDFs. Reading the
PDF in the table will likely be the next issue.

 

Is there a simpler way to do this?

 

Tom Frederick

Elm City Center

1314 W Walnut

Jacksonville, IL  62650

Off - 217-245-9504

Fax - 217-245-2350

Email - [email protected]

Web - www.elmcity.org

 


Reply via email to