Solved

How to find login name

Posted on 2010-11-11
5
507 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

752 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