Solved

How to find login name

Posted on 2010-11-11
5
506 Views
Last Modified: 2012-06-21
Hi Guys,

I've written an access project database that automatically uses the generic dialog prompt for the users credentials. How can I stop this generic dialog box from appearing so I can use a customised form that asks for the users credentials. I want to store the username in a global variable so the database knows who is logged onto a particular session. There doesn't seem to be a way of knowing who is logged into the project file, unless I'm missing something. Environ$("Username") will give me the windows login, is there something similar that gives me the sqlserver login for the session.

Thanks in advance.
0
Comment
Question by:dataflowjoe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34111136
SELECT SYSTEM_USER
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 34114170
Correct my if I am wrong but I believe the author is asking how to bypass the dialog box that asks for a password when SQL Server tables are linked into an MS Access database.
0
 
LVL 2

Accepted Solution

by:
dataflowjoe earned 0 total points
ID: 34220052
I'll ended up creating a generic login which only had permissions to a logins table this allowed the user into the ADP framework where I presented a dialog box where they confirmed their credentials against this logins table if the login is good a reconnection to the sql server is made with a hardcoded connection string that give the user full access to the database.
Not very elegant and probably breaking every rule in the book but it works really well.


0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 34222824
>>Not enough participation<<
Unfortunately not enough feedback for what should have been a trivial solution in MS Access.
0
 
LVL 2

Author Closing Comment

by:dataflowjoe
ID: 34246425
Not enough participation
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Viewers will learn how the fundamental information of how to create a table.

740 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