Is there any way to find out username pwd in Access

L

Lara

How do I retrieve the username and password in Access
for Sql server logon?

I have linked tables to sql server and upon launch of
forms, I enter the username and password, these are
sql server usernames and passwords.

I would like to use these usernames elsewhere in my
forms/reports, is there any way I can use it?

for eg. select * from table1 where field1 = username

Thanks for your help in advance,
-Lara
 
B

BJ Freeman

create global vars in a modular unit
then have the form store the data there.
then any code can retrieve it.
 
L

Lara

Van,

select current_user works fine on sql server, but
it doesn't work in access. In access it is looking for
from table name.

Any ideas???

Thank you,
Lara
 
S

Steve Jorgensen

If Access allowed obtaining the user's password through the programming
interface, that would be a big security hole, and Microsoft did not allow it
for that reason. If this were available, any application the user ran could
have a piece of code in it that could steal the user's password, store it
somewhere, then the programmer could use that info to gain that user's
permissions to any other (e.g. personal) Access databases.
 
L

Lara

Steve,

This cannot be construed as a security hole. This is
my need. I need to print the name of the user who is
printing report on top for our records.

I don't want to see someone's password or modify someone's
password. Just to be able to get the username
for printing purposes.

Thanks,
-Lara
 
V

Van T. Dinh

Of course, it doesn't work in an Access Query.

Use CURRENT_USER in a Pass-Through Query.
 
S

Steve Jorgensen

I understand that you need it, but Access doesn't do it. You'll have to find
an alternative.

What you want to -do- is not a security hole, but what others could do with
that feature if it existed it definitely a security hole.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top