Subject | Re: How can I prevent DELETE/INSERT/UPDATE on a table |
---|---|
Author | Adam |
Post date | 2005-08-01T23:31:09Z |
--- In firebird-support@yahoogroups.com, Doru Constantin
<doru.constantin@m...> wrote:
table with some preset data, and you do not want ANYONE to be able to
insert, change or delete ANY record.
Don't have the exact syntax, but it would be something like.
CREATE EXCEPTION E_DISALLOWCHANGE 'Cant change records in
[tablename]';
SET TERM ^;
CREATE TRIGGER [TRIGGERNAME] ON [TABLENAME]
BEFORE INSERT OR BEFORE UPDATE OR BEFORE DELETE POSITION 0
AS
BEGIN
EXCEPTION E_DISALLOWCHANGE;
END
^
If it is a disallow a single user thing, then use the built in
permissions to do it.
Adam
<doru.constantin@m...> wrote:
> What can I do to prevent DELETE/INSERT/UPDATE on a table?It depends on what you are trying to do. If you have pre-loaded the
> I suspect a trigger will be involve, but...
> Thank you.
> </doru>
>
>
> [Non-text portions of this message have been removed]
table with some preset data, and you do not want ANYONE to be able to
insert, change or delete ANY record.
Don't have the exact syntax, but it would be something like.
CREATE EXCEPTION E_DISALLOWCHANGE 'Cant change records in
[tablename]';
SET TERM ^;
CREATE TRIGGER [TRIGGERNAME] ON [TABLENAME]
BEFORE INSERT OR BEFORE UPDATE OR BEFORE DELETE POSITION 0
AS
BEGIN
EXCEPTION E_DISALLOWCHANGE;
END
^
If it is a disallow a single user thing, then use the built in
permissions to do it.
Adam