Home » RDBMS Server » Enterprise Manager » retrieve pdf data from the blob data type
retrieve pdf data from the blob data type [message #130989] Wed, 03 August 2005 14:33
Mushtaq Ahmad
Messages: 2
Registered: January 2003
Junior Member
Hi
In one my table I have stored dpf data in BLOB data type column. Now I was to retrieve that informtion through Oracle report 6i. Here is the code that I am using:
CREATE OR REPLACE PROCEDURE readLOB_proc(
Lob_loc OUT BLOB) IS
Buffer RAW(32767);
Amount BINARY_INTEGER := 32767;
Position INTEGER := 1000;
Chunksize INTEGER;
v_lob BLOB;
BEGIN
/* Select the LOB: */
SELECT syrepdf_body INTO v_lob
FROM syrepdf WHERE syrepdf_id = 141;
/* Find out the chunksize for this LOB column: */
Chunksize := DBMS_LOB.GETCHUNKSIZE(Lob_loc);
IF (Chunksize < 32767) THEN
Amount := (32767 / Chunksize) * Chunksize;
END IF;
/* Opening the LOB is optional: */
DBMS_LOB.OPEN (Lob_loc, DBMS_LOB.LOB_READONLY);
/* Read data from the LOB: */
DBMS_LOB.READ (Lob_loc, Amount, Position, Buffer);
/* Closing the LOB is mandatory if you have opened it: */
DBMS_LOB.CLOSE (Lob_loc);
Lob_loc := v_lob;
END;
I know that this procdure should be on server side not on client side; so I comipled it and I am not sure either it should work or not?
Previous Topic: OMS(oracle manager server) can~t start base win2K server
Next Topic: problem with enterprise manager
Goto Forum:
  


Current Time: Thu Apr 18 21:14:01 CDT 2024