Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: trigger Problem
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
![]() |
![]() |