Solved

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

Posted on 2003-10-24
4
200 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

932 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

11 Experts available now in Live!

Get 1:1 Help Now