Solved

How to find login name

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

920 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

15 Experts available now in Live!

Get 1:1 Help Now