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: pl/sql table and commit

Re: pl/sql table and commit

From: Guy <guhar1_at_yahoo.com>
Date: 16 Nov 2005 12:06:48 -0800
Message-ID: <1132171608.891664.195580@g14g2000cwa.googlegroups.com>


Actually I dont know why the COMMIT I incidently used changed anything, but I have identified the fragment of code which does not work:

This is the old code which fails:

               I :=0;
               LOOP

                 Valid := True;
                 FETCH TMPCUR INTO R1 ;
                 EXIT WHEN TMPCUR%NOTFOUND;
                 IF NOT(ASP42.tab_ClinicUser.EXISTS(R1.r_clinic)) THEN
                   DBMS_OUTPUT.PUT_LINE('!clinique invalide '
                                 ||TO_CHAR( R1.r_clinic));
                   Valid := False;
                 END IF;
                 IF Valid  THEN
                   i := i + 1;
                   Tab_sessionSector(i):= R1 ;
                 END IF;

               END LOOP;

This is the code which now works:
		iCount := 1;
		Tab_sessionSector.Delete;

		LOOP
		FETCH TMPCUR INTO R1;
		   EXIT WHEN TMPCUR%NOTFOUND;
		   iCount := iCount + 1;
		   Tab_sessionSector(iCount) := R1;
		END LOOP;

Less pressure now, but the mystery thickens. This usually bites you pretty bad later... Received on Wed Nov 16 2005 - 14:06:48 CST

Original text of this message

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