Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Mike Aubury — — source: Informix-list mailing list archive (1991-1998)
In article: <4q9dbq$qo1@cssun.mathcs.emory.edu> Spetc@aol.com
writes:
>
> Hi all
>
> We are using Online 5.07.
>
> Can we write triggers which inhibits users with name
beginning "xx" from
> performing inserts, updates, or deletes on certain tables?
>
> How do you get the username in a trigger?
>
> Thanks in anticipation!!
>
>
>
you could try
create trigger t1 insert on tabname
for each row where user[1,2]="AB" (
execute procedure block_it);
and the block_it procedure
create procedure block_it()raise exception -746,0,"Your not allowed to do that!";
end procedure;
Note - I havent bashed this in myself so the syntax may
have the odd mistake
--
--
Mike Aubury _\\?/_
|O O|
+----------oOOO-\\_/-OOOo---------+----------------------------
-+
| Heisenberg may have been here | mike@aubury.demon.co.uk
|
| | http://www.flash.net/~aubit
|
+--------------------------------+----------------------------
-+
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.