This content has been marked as final. Show 4 replies
Arun, thanks for the great suggestion. I can use this to COMPRESS.
But to un-COMPRESS before showing: I got an idea like this. Have a table with Primary Key vield + BLOB column. This table will have only 1 record always. i.e. we uncompress the BLOB in my table and put it to this table. Now this 1 row table has the uncompressed document.
So Now I can use web_util to get copy the blob value to client HDD from this table.
I tried this trigger method to compress. It does not work. I get an invalid argument error.
I however figured a complete solution using forms: Here it is:
to compress and store:
Just put it to the table and use an update statement like this:
SET da_document = UTL_COMPRESS.LZ_COMPRESS( da_document ) WHERE pk = :DLO_CHANNA_DOCUMENTS.pk;
Now to uncompress and show
(1.) Create a temp table with blob column
(2.) Insert record to temp table like this:
INSERT INTO dlo_channa_temp_blob
SELECT v_next_val, UTL_COMPRESS.LZ_UNCOMPRESS( da_document )
WHERE pk = :dlo_channa_documents.pk;
(3.) Now use webutil_file_transfer.db_to_client to transfer from temp table to client hdd and show using
CLIENT_HOST( 'cmd /C start ' || v_saved_file_name_full_path); -- Open the document in Word
Edited by: Channa on Feb 26, 2010 4:02 AM