Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to find login name

Posted on 2010-11-11
5
Medium Priority
?
509 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

Back Up Your Microsoft Windows Server®

Back up 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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

721 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