}> 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;
}
Hi Mike, how's it going?!!
Much as I hate to query your infinite wisdom (no, I'm not being
sarcastic!), would this prevent the insert, or just tell the user
they're not allowed to do something they've already done? If I'm
right (highly unlikely), could an 'on exception' statement trap the
error and either rollback the transaction, or delete the inserted
row?
So many questions, so few answers!!!
Cheers,
Richard.
on exception statement be added to