How to grant permissions to single SELECT/UPDATE statment (sql server) ?

Posted by Albert on Stack Overflow See other posts from Stack Overflow or by Albert
Published on 2010-03-08T22:09:31Z Indexed on 2010/03/08 22:21 UTC
Read the original article Hit count: 246

Filed under:
|
|

I have a problem when trying to execute this update statement (below) using C# SqlCommand when I execute it locally it works fine, but when deployed to another machine I got a permission error

The SELECT permission was denied on the object Order ... The UPDATE permission was denied on the object Order ...

Update Statement "UPDATE Order SET Request = @request WHERE Id = @ID";

Is there any way to add GRANT SELECT and GRANT UPDATE to a single statement like the update above without using a stored procedure?

or the SP is the way to go on this?

Thanks in advance

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about update