Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Strange error in Stored Procedure
Sun, Nov 15 2009 2:27 PMPermanent Link

Uli Becker
I was suprised to get an error when executing this simple stored
procedure (I reduced the code, the error occurs during the
select-statement):

PROCEDURE "UpdateAccountsOrder" (IN "BenutzerID" INTEGER)
BEGIN
  DECLARE Result INSENSITIVE CURSOR FOR Stmt;
  ...

  PREPARE Stmt FROM
    'SELECT AccountsID, OrderID from accounts where BenutzerID = ?
order by orderID';
  OPEN Result using BenutzerID;
  ...

END

---------------------------
ElevateDB Manager
---------------------------
ElevateDB Error #700 An error was found in the statement at line 9 and
column 5 (ElevateDB Error #401 The table or view accounts does not exist
in the schema Default)

Any idea what's wrong here?
I am using the latest Build.

Regards Uli
Mon, Nov 16 2009 3:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< I was suprised to get an error when executing this simple stored
procedure (I reduced the code, the error occurs during the
select-statement): >>

Can you send me the database catalog that you're using ?

Thanks,

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Nov 16 2009 4:49 PMPermanent Link

Uli Becker
Tim,

> Can you send me the database catalog that you're using ?

Done.

Uli
Mon, Nov 16 2009 10:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

Thanks.  The problem is the privileges for the Accounts table.  For some
reason, the privileges for the System user were all cleared, therefore the
procedure couldn't "see" the table.  All stored procedures run, by default,
as the System user.

Use this SQL to correct the issue (run as an Administrator):

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER,DROP
ON TABLE "Accounts"
TO "System"

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Nov 17 2009 3:38 AMPermanent Link

Uli Becker
Tim,

> Thanks.  The problem is the privileges for the Accounts table.  For some
> reason, the privileges for the System user were all cleared, therefore the
> procedure couldn't "see" the table.  All stored procedures run, by default,
> as the System user.

Great news. Thanks.

Uli
Image