<p>I've got an ms-access application that's accessing and ms-sql db through an ODBC connection. I'm trying to force my users to update the data <em>only</em> through the application portion, but I don't care if they read the data directly or through their own custom ms-access db (they use it for creating ad hoc reports).</p>

<p>What I'm looking for is a way to make the data only editable if they are using the compiled .mde file I distribute to them. I know I can make the data read only for the general population, and editable for select users. </p>

<p>Is there a way I can get ms-sql to make the data editable only if they are accessing it through the my canned mde?</p>

<p>Thought, is there a way to get ms-access to log into the database as a different user (or change the login once connected)?</p>

<hr>

<p>@Jake,<br>
Yes, it's using forms. What I'm looking to do is just have it switch users once when I have my launchpad/mainmenu form pop up.</p>

<p>@Peter,<br>
That is indeed the direction I'm headed. What I haven't determined was how to go about switching to that second ID. I'm not so worried about the password being sniffed, the users are all internal, and on an internal LAN. If they can sniff that password, they can certainly sniff the one for my privileged ID.</p>

<p>@no one in general,<br>
Right now its security by obscurity. I've given the uses a special .mdb for doing reporting that will let them read data, but not update it. They don't know about relinking to the tables through the ODBC connection. A slightly more ms-access/DB literate user could by pass what I've done in seconds - and there a few who imagine themselves to be DBA, so they will figure it out eventually.</p>

[{'answer_id': 50215, 'author': 'Peter', 'author_id': 5189, 'author_profile': 'https://Stackoverflow.com/users/5189', 'pm_score': 3, 'selected': True, 'text': '<p>There is a way to do this that is effective with internal users, but can be hacked.  You create two IDs for each user.  One is a reporting ID that has read-only access.  This is they ID that the user knows about: Fred / mypassword</p>\n\n<p>The second is an ID that can do updates. That id is Fred_app / mypassword_mangled.  They log on to your app with Fred.  When your application accesses data, it uses the application id.</p>\n\n<p>This can be sniffed, but for many applications it is sufficient.</p>\n'}, {'answer_id': 50233, 'author': 'Jake Hackl', 'author_id': 5247, 'author_profile': 'https://Stackoverflow.com/users/5247', 'pm_score': 1, 'selected': False, 'text': '<p>Does you app allow for linked table updates or does it go through forms? Sounds like your idea of using a centralized user with distinct roles is the way to go. Yes, you could change users but I that may introduce more coding and once you start adding more and more code other solutions (stored procedures, etc) may sound more inviting. </p>\n'}]
['https://Stackoverflow.com/questions/50164', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/685/']