Solved

Need advice creating secure login in MS ACCESS/MS SQL?

Posted on 2003-10-24
4
199 Views
Last Modified: 2012-08-14
I have a MS SQL 2000 server and I use MS Access XP as the front end using linked tables. I want to be able to create a login that allows clients to only see there information preferably using sql server authentication. I have a clientid table that is used to identify a clients information, all data for a client can be referenced back to that id, so is there a simple way to make a Access front end display only the data that is related to the clientid by referencing the sql authentication login?? Any other suggestions would be appreciated.

Thanks in advance for your time.
0
Comment
Question by:tekguy4
  • 3
4 Comments
 
LVL 3

Expert Comment

by:syntnx
ID: 9616229
Hey tekguy,

Well you can use the following stored procedure to obtain the currently logged in user

---
Alter Procedure [current system user]
AS
DECLARE @sys_usr char(30)
SET @sys_usr = SYSTEM_USER
SELECT @sys_usr
GO
-----

Does each user/client have their own copy of the .adp file? If so then you can probally use the above stored procedure to obtain the current user locally logged in, and run a query passing their login to a parameter query/stored procedure to pull the information. Ive never tried this with SQL but dont see why it would work

hope this helps somewhat

syntnx
0
 
LVL 3

Accepted Solution

by:
syntnx earned 75 total points
ID: 9616286
Or If there are only a handful of users that never changes. Then a view could be created for each user, the their .adp that shows their info. Permissions can be set on each users "custom" view. Of course this is not a robust solution if you are constantly adding new users.

syntnx
0
 

Author Comment

by:tekguy4
ID: 9628288
Thanks Sytnx, your help pointed me in right direction.
I created a new SQL table called login with 2 columns: Name and CLientID
The Name column equals the users SQL Authentication Login name and the client id equals the CLIENTid I want them to see, then using Views with Where clause against "Current_User" I get the results I need.

Thanks again
0
 
LVL 3

Expert Comment

by:syntnx
ID: 9628502
hey no problem, glad to have helped!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now