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: trigger Problem

Re: trigger Problem

From: Mark Styles <styles-nospam_at_lambic.co.uk>
Date: Thu, 08 Jul 1999 15:44:22 GMT
Message-ID: <3784c6ea.26068594@news.intra.bt.com>


Glen Upreti <Glen.Upreti_at_nau.edu> instructed their monkeys to type:

>CREATE OR REPLACE TRIGGER LOCKER
> AFTER INSERT ON BOB.SEC_TABLE
>FOR EACH ROW
>DECLARE
>cnum INTEGER;
>
>BEGIN
> cnum := SYS.DBMS_SQL.OPEN_CURSOR;
> SYS.DBMS_SQL.PARSE(cnum,'ALTER USER '||:NEW.USERID||' ACCOUNT
>LOCK',SYS.DBMS_SQL.NATIVE);
looks to me like you need a 'dbms_sql.execute(cnum);' here

> SYS.DBMS_SQL.CLOSE_CURSOR(cnum);

>I also wrote a stored proc that takes an in
>of userid and locks the users account (this works by itself), but when
>it is called by the trigger it fails to lock the user's account!

I don't know why this is though

>PS what does HTH stand for?

Hope That Helps

HTH :) Mark Styles
Oracle developer and DBA
http://www.lambic.co.uk/company Received on Thu Jul 08 1999 - 10:44:22 CDT

Original text of this message

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