Hi All, SQL AnyWhere 17.0.9.4913 There is a table "dba.TEST1". User "User1" has no rights to insert data into this table. There is a stored procedure "Proc1". The user "User1" has the right to execute this procedure.. procedure dba.Proc1 begin select GET_IDENTITY('dba.TEST1') as nKEY, 10 as F1 end When calling this procedure, I get the error message: "You do not have permissions to insert into "TEST1"". If the procedure is slightly changed, then there is no error. procedure dba.Proc1 begin declare nID integer; set nID = GET_IDENTITY('dba.TEST1'); select nID as nKEY, 10 as F1 end Question: Why does an error occur in the first case ? After all, the user has the rights to the procedure, or the request at the end of the procedure does not fall under these rights ? Maybe this is a server error ? |
How do you call that procedure, via CALL() or as part of the FROM clause of a SELECT statement?
(I'm asking because in the latter case, the first variant could be inlined because it is just one single SELECT statement, and that might explain the error message...)
I call the procedure as call dba.Proc1()
The procedure “Proc1” is actually a simplified version of the actual procedure. And there before the "select" is still a lot of other sql-code.