Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_sql problem
As of 8.0.3.2, there is no dbms_sql.v8, dbms_sql.native is what you want to
use.
In article <6kidgd$sgd_at_dfw-ixnews8.ix.netcom.com>,
"Venkat" <vreddy_at_no_spamix.netcom.com> wrote:
>
> Malini:
> In line 7 where you have dbms_sql it should be something like DBMS_SQL.V8 or
> DBMS_SQL.NATIVE
>
> Venkat
>
> >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;
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu May 28 1998 - 11:26:03 CDT