Update of BLOB data type in ORACLE
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nath_Ranasinghe
Posted On:   Wednesday, April 28, 2004 03:07 AM

create or replace procedure IMH_MODIFY_ANNUAL_ACC_REPORTS( M_MERCH_SID IMH_ANNUAL_ACC_REPORTS.MERCH_SID%TYPE, M_SPH_CUST_SID IMH_ANNUAL_ACC_REPORTS.SPH_CUST_SID%TYPE, M_YEAR_CODE IMH_ANNUAL_ACC_REPORTS.YEAR_CODE%TYPE, M_REPORT_IMAGE IN BLOB, M_AAR_SID_NEW OUT IMH_ANNUAL_ACC_REPORTS.AAR_SID%TYPE )AS M_AAR_SID IMH_ANNUAL_ACC_REPORTS.AAR_SID%TYPE; T_report_image blob; begin begin select AAR_SID into M_AAR_SID from IMH_ANNUAL_ACC_REPORTS where MERCH_SID = M_MERCH_SID and SPH_CUST_SID = M_SPH_CUST_SID and YEAR_CODE = M_YEAR_CODE ;    More>>

create or replace procedure IMH_MODIFY_ANNUAL_ACC_REPORTS(
M_MERCH_SID IMH_ANNUAL_ACC_REPORTS.MERCH_SID%TYPE,
M_SPH_CUST_SID IMH_ANNUAL_ACC_REPORTS.SPH_CUST_SID%TYPE,
M_YEAR_CODE IMH_ANNUAL_ACC_REPORTS.YEAR_CODE%TYPE,
M_REPORT_IMAGE IN BLOB,
M_AAR_SID_NEW OUT IMH_ANNUAL_ACC_REPORTS.AAR_SID%TYPE
)AS

M_AAR_SID IMH_ANNUAL_ACC_REPORTS.AAR_SID%TYPE;
T_report_image blob;
begin

begin
select AAR_SID into M_AAR_SID from IMH_ANNUAL_ACC_REPORTS
where MERCH_SID = M_MERCH_SID
and SPH_CUST_SID = M_SPH_CUST_SID
and YEAR_CODE = M_YEAR_CODE ;
end;

begin
update IMH_ANNUAL_ACC_REPORTS
set REPORT_IMAGE = empty_blob()
where AAR_SID= M_AAR_SID;
--MERCH_SID = M_MERCH_SID
--and SPH_CUST_SID = M_SPH_CUST_SID
--and YEAR_CODE = M_YEAR_CODE ;

COMMIT;
end;

SELECT report_image INTO T_report_image
FROM IMH_ANNUAL_ACC_REPORTS
where AAR_SID = M_AAR_SID FOR UPDATE ;

update IMH_ANNUAL_ACC_REPORTS
set REPORT_IMAGE = M_REPORT_IMAGE
where AAR_SID= M_AAR_SID;


M_AAR_SID_NEW:=M_AAR_SID;

commit;

end IMH_MODIFY_ANNUAL_ACC_REPORTS;


I call this SP through my front end.But it doesn't work.Please clarify this problem.

   <<Less
About | Sitemap | Contact