Xref: alice comp.databases.oracle.misc:52397
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!tor-nx1.netcom.ca!tor-nn1.netcom.ca.POSTED!not-for-mail
From: "Pierre Oub" <POub123@hotmail.com>
Newsgroups: comp.databases.oracle.misc
Subject: PL/SQL Array generation
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <7Q1m4.222684$5r2.581760@tor-nn1.netcom.ca>
Date: Wed, 2 Feb 2000 17:03:40 -0500
X-Complaints-To: abuse@netcom.ca
X-Trace: tor-nn1.netcom.ca 949528963 206.217.37.2 (Wed, 02 Feb 2000 17:02:43 EDT)
NNTP-Posting-Date: Wed, 02 Feb 2000 17:02:43 EDT
Organization: Netcom Canada

Hi everybody

I would like to copy "somewhere" an image of record i want to update later.
I use this only for 3 or 4 records each time (but very often).
-1- So i would like to create a VARRAY of record to store the selected
record,
-2- Do my update.
-3- Then i need an answer from an external procedure (it takes 5 secondes)
-4- If it's a bad answer, i would like to copy the update back the records.

I can use a classic rollback, but i don't want to lock the table for such a
long time (5 secondes).

I try to create my ARRAY, but i have a invalide error.

Can anyone could give me a direct to fix it ?

Thanks

My script

CREATE OR REPLACE
PROCEDURE my_proc PROCEDURE (modify_by IN VARCHAR2 DEFAULT NULL) IS
TYPE t_emp IS VARRAY(10) OF my_database.emp%ROWTYPE;
v_emp     t_emp := NULL;
BEGIN
      SELECT  *
      INTO      v_emp
      FROM    my_database.emp
WHERE id = '99999';
END my_proc;
/


When i generate it ia have this error, but i check and i can see my EMP
table.

LINE/COL ERROR
-------- -----------------------------------------------------------------
5/3      PLS-00493: invalid reference to a server-side object in a local
context
5/3      PL/SQL: SQL Statement ignored





--
Pierre Oub

Remove "123" to answer me



