Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-10-24
4
Medium Priority
?
212 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 300 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

824 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