Guest_imported
New member
- Jan 1, 1970
- 0
Does anyone know of an API call to use to get the username and Password from the current Windows user?
I have used the GetUserName API which returns the NT Username, but have not got anything to return the password.
The reason I need it, and maybe someone has a better way, is that our company uses Windows NT Authentication to connect to our SQL Server. I want to maintain this without using a DSN, therefore, pass in the Windows username and login to the SQL Server to allow connection to the database. I want to use the authentication info to restrict the view of the database objects that are going to be displayed to only the objects that the current user has access to.
I have used the GetUserName API which returns the NT Username, but have not got anything to return the password.
The reason I need it, and maybe someone has a better way, is that our company uses Windows NT Authentication to connect to our SQL Server. I want to maintain this without using a DSN, therefore, pass in the Windows username and login to the SQL Server to allow connection to the database. I want to use the authentication info to restrict the view of the database objects that are going to be displayed to only the objects that the current user has access to.