*** Urgent Retrieve UID

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am relying on Sql Server Security for linked tables in Access.

Now I have a need to know the UID of the user logged on. How can I get it?
Based on this UID, I want to restrict access to certain records.

Thank you,
-Me
 
CurrentUser() retrieves the current Username.

If you want the password, I don't think that's retrievable. If it was,
SQLServer would hardly be secure with Access as a Front End.

You need to be real carefull. Depending on how you implement Access as a Front
End, you could potentially bypass all security you have setup in SQLServer.

In Access, RWOP Queries (Run With Owner Permission) may be what you're looking
for. They are only as secure as Access User-Level Security.

Chris
 
Hi Chris,

Thanks for the reply!

For some reason, the CurrentUser shows the Access userid. It doesn't show
Sql Server Userid with which I am logging on. What I may be doing wrong?

Moreover, I don't want password, I just need the SQL server UID.

Thank you again for your help in advance,
-Me
 
Hi Me,

I don't know. Hopefully someone else will answer who's more familiar with
SQLServer.

Either the name you pass to SQLServer is stored (or can somehow be retrieved)
when Access signs onto SQLServer, or perhaps there's a way to recover from
SQLServer.

For the second option, I don't know. And for the first option, I don't know
what your Access program does.

Chris
 
Back
Top