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 -> dbms_sql problem

dbms_sql problem

From: <mkaushik_at_harvestinc.com>
Date: Wed, 27 May 1998 23:30:04 GMT
Message-ID: <6ki7ls$sqq$1@nnrp1.dejanews.com>


This is actually straight out of Oracle 8 documentation for Dynamic SQL, but I am unable to load it. I have all resource and connect permissions and there does not seem to be any syntax errors. What am I missing ?

Thanks,
Malini

The error I get is


Line/Col     Error
7/5          P/L SQL : Statement ignored
7/67         PLS-00226: package 'DBMS_SQL' used as variable reference
----------------------------------------------------------------------

Procedure text with line numbers


1 CREATE OR REPLACE PROCEDURE demo(salary IN NUMBER) AS 2 cursor_name INTEGER;
3 rows_processed INTEGER;
4 BEGIN
5
6 cursor_name := dbms_sql.open_cursor;

7    dbms_sql.parse(cursor_name, 'DELETE FROM emp WHERE sal > :x', dbms_sql);
8    dbms_sql.bind_variable(cursor_name, ':x', salary);
9    rows_processed := dbms_sql.execute(cursor_name);
10   dbms_sql.close_cursor(cursor_name);
11
12 EXCEPTION WHEN OTHERS THEN
13 dbms_sql.close_cursor(cursor_name); 14 END;
15 /

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed May 27 1998 - 18:30:04 CDT

Original text of this message

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