Link to home
Start Free TrialLog in
Avatar of Buck Beasom
Buck BeasomFlag for United States of America

asked on

Limit Query Execution to Read Only

I am combining several dozen primitive Access databases into a comprehensive application with menu-driven functionality. But some users of the old systems are used to being able to create ad hoc queries to look at specific sub-sets of data. I've created an "Ad Hoc" application to allow this - linking to the same back end as the main application does. Then each user can build up his/her own set of ad hoc tools and they won't be over-written when new versions of the main application .accdb over-write previous versions.

Is there a way to limit the queries that users build in the ad hoc environment to "Read Only" so they can pull Select and Cross tab queries but can't execute action queries that will change the data?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One way: Query Properties.
Record Type: Snapshot
Your best best is to move the data into SQL Server, which has full security and you'll be able to control at the server level.  By presenting views for each of the tables, you'll be able to limit the users to read-only data.

 ULS security in Access is cumbersome at best, and with the ACE database format, has been dropped.

 And snapshots are a bad idea as they are a performance drain.  Each query that would run would make a complete copy of the resultset locally, besides which, you'd need to rely on the user making the query a snapshot, which if they wanted to modify data, they would not do.

Jim.
If I'm understanding you correctly, you are allowing them to change data through forms that you have in your "comprehensive application", but through another application want to allow the same users to build their own queries (full access to the design environment in a database linked to your back-end?) .

If that describes your setup, I don't think there is any way you can prevent them from writing/running action queries.
If queries are created through application, an alternative to snapshot type query, you may change the primary key to a calculated field, by adding 0 (if numeric).
Avatar of Buck Beasom

ASKER

I don't think these links refer to 2007/2010, but they were helpful anyway.