Subject | Grant on procedure |
---|---|
Author | Herbert.Augustiny@sptroth.com |
Post date | 2002-03-08T09:02:23Z |
Hi
I have a procedure (Generate_ID) to generate special ID's and this
procedure gets called from my before insert trigger if the new.ID field is
null. This means if a user does a "Insert into table (ID, value_field)
values (1, 2)" the procedure Generata_ID gets never called.
The trigger and procedure work as expected, but if I connect to the DB with
a user which has not granted the execute privilege on Generate_ID I am not
able to insert new records in the above table, even if I provide a value
for the ID field and the procedure Generate_ID gets never called.
Is this normal? I think, the user should be able to do inserts as long as
he provides a value for the ID field.
This is my trigger code:
CREATE TRIGGER Before_Isert_Java_Resource FOR Java_Resources
ACTIVE BEFORE INSERT POSITION 0
as
begin
IF (NEW.ID IS NULL) THEN EXECUTE PROCEDURE Generate_ID
'Java_Resources' RETURNING_VALUES NEW.ID;
end !!
Herbert
I have a procedure (Generate_ID) to generate special ID's and this
procedure gets called from my before insert trigger if the new.ID field is
null. This means if a user does a "Insert into table (ID, value_field)
values (1, 2)" the procedure Generata_ID gets never called.
The trigger and procedure work as expected, but if I connect to the DB with
a user which has not granted the execute privilege on Generate_ID I am not
able to insert new records in the above table, even if I provide a value
for the ID field and the procedure Generate_ID gets never called.
Is this normal? I think, the user should be able to do inserts as long as
he provides a value for the ID field.
This is my trigger code:
CREATE TRIGGER Before_Isert_Java_Resource FOR Java_Resources
ACTIVE BEFORE INSERT POSITION 0
as
begin
IF (NEW.ID IS NULL) THEN EXECUTE PROCEDURE Generate_ID
'Java_Resources' RETURNING_VALUES NEW.ID;
end !!
Herbert