Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Deferred constraint question
Jim Jenkinson wrote:
>
> That was my thought as well, but, although the statement parses and executes
> without error, the constraint remains in immediate mode.
>
> Thank you for your response.
We use this approach with success.
In a package body (not in the specification) we have an exec-ddl-procedure P_DBMSexec. In the specification we have one procedure for deferring a constraint, one for setting it immediate, and also many other ddl-procedures.
The language_flag in the exec-ddl procedure is dbms_sql.native, not v7
Maybe you have an exception-handler which catches the error and don't raise it again, like this:
exception
when others then if dbms_sql.is_open(exec_cursor) then dbms_sql.close_cursor(exec_cursor); end if; raise; --> Do you have this?
Njål
>
> Jonathan Lewis wrote in message
.
.
> > n := dbms_sql.open_cursor;
> > dbms_sql.parse(
> > c =>n,
> > statement =>'set constraint ' || i_constraint || ' deferred' ,
> > language_flag => dbms_sql.v7
> > );
> > v_junk := dbms_sql.execute (n);
Received on Thu Jun 24 1999 - 19:09:28 CDT