Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Change item - Need Help

Re: Change item - Need Help

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Mon, 27 Sep 2004 19:37:14 -0700
Message-ID: <1096339111.787448@yasure>


Radosław G±siorek wrote:

> Hi to all again
>
> I have problem with running this procedure in Oracle Portal.
> This procedure is comipiled correctly but when I select "execute" I have
> error:
>
>
> error: begin
> "PORTAL"."TEST2";
> end; (WWV-11230)
>
>
>
> Here how it looks:
>
> Create or Replace Procedure PORTAL.TEST2
> as
> l_item_master_id number;
> p_user_name VARCHAR2(60) := 'xxx';
> p_password VARCHAR2(60) := xxx;
> p_company VARCHAR2(60) := NULL;
>
> masterid number;
> itemid number;
> catid number;
> folderid number;
> regionid number;
>
> exceptionLevel number := 0;
> begin
> wwctx_api.set_context('xxx','xxx',NULL);
>
> for c1 in (SELECT * FROM WWSBR_ALL_ITEMS i WHERE i.ID=38280) loop
> masterid := c1.ID ;
> itemid := c1.MASTERID ;
> catid := c1.CAID ;
> folderid := c1.FOLDER_ID ;
> regionid := c1.FOLDER_REGION_ID ;
> end loop;
>
>
> htp.center(masterid || ' ' || itemid || ' ' || catid ||' ' ||folderid || '
> ' || regionid );
>
> l_item_master_id := wwsbr_api.modify_item (
> p_item_id => 38280,
>
> p_master_item_id => 36395,
> p_caid => 33,
> p_folder_id => 1,
> p_display_name => 'Movie Review',
> p_region_id => '',
> p_text => 'This is the text of the review.'
> );
>
>
> wwpro_api_invalidation.execute_cache_invalidation;
>
> end;
>
>
> Thanks for all suggestions and Helps

Nothing jumps out at me immediately with respect to your problem but there are a few things that do and they are:

  1. Hard coded values such as p_item_id and i.ID. This is not a good idea.
  2. None of your variables are defined using %TYPE. Are none of them related to database columns?
  3. Your variables masterid, itemid, catid, etc. server no useful purpose. Just use c1.id, c1.masterid, etc. in your call to htp.center.
  4. Your procedure has no exception handler. -- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)
Received on Mon Sep 27 2004 - 21:37:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US