RWOP Queries

RWOP stands for Run With Owner Permissions.  When a user runs a RWOP query, they are running it as though the owner of the query was running it.  This gives the user permission to access tables that they otherwise have no permission on.  You can set this in design view of a query, in the property sheet - set Run Permissions to Owner's.  In SQL view, the equivalent is to add WITH OWNERACCESS OPTION to the end of the SQL statement.

The owner of a query most often has full permission on the tables, so this allows the user to run the query.

Setting a query to RWOP doesn't automatically mean that the user has all the permissions that the query owner does.  You still need to assign appropriate permissions on the query in order the user to run it.  So you could assign read data permissions on the query, and they'll only be able to read data, even though the owner has full permissions on the underlying table(s).

A query owner sometimes does not have full permissions on the underlying tables.  For example, if they had only read data permissions on the underlying tables, they can create a query and set it to RWOP.  Granting update/insert/delete permissions on the query won't allow the user to update, insert, or delete any records.  They'll still be restricted by the permissions that the query owner has on the tables - read data.

RWOP is only relevant with saved queries.  Trying to use this in code will not work.  The owner of the SQL statement, in this case, is the user running it and they have no permissions on the table(s).  One workaround is to create a RWOP query for every table, then use these RWOP queries in the SQL statement.
 

 
     

Home | Access Tips | Clients | Links

Copyright 2004 - Joan Wild