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 ?

asked 07 Feb, 03:30

Stalker's gravatar image

Stalker
298121734
accept rate: 12%

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...)

(07 Feb, 04:01) Volker Barth

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.

(07 Feb, 04:38) Stalker
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×113
×27
×7

question asked: 07 Feb, 03:30

question was seen: 109 times

last updated: 07 Feb, 04:38