Menu

#23 Invalid error without permissions to SQL Server Procedure

v1.0_(example)
open
nobody
None
5
2019-08-13
2014-09-29
George
No

A user tried to execute a procedure while lacking execute permissions on the object.

This caused the misleading error

raise api.ProgrammingError('You must supply %d parameters for this stored procedure' % \
                                           (self.cmd.Parameters.Count - 1))

to be raised with self.cmd.Parameters.Count at 0 (so "-1" in the error message)

The problem was resolved once permissions were granted but can this situation be checked for and a better error raised?

Discussion

  • George

    George - 2014-09-29

    Sorry, forgot to add that this was in MS SQL Server

     
  • George

    George - 2019-08-13

    This also happens if the procedure doesn't exist in the current database.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.