Re: Using Windows Authentication
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
That's awesome Philipp. Now I have my work cut out for me going back to
reprogram all my older apps to do this.
While I'm at it, is there a way to query the database for all current
allowed logins? I want to give admins access to change certain permissions
for users (not SQL permissions, but program-specific permissions which I
will store in a permissions table).
Thanks!
Ryan
"Philipp Stiefel" <phil@xxxxxxxxxxxxxxx> wrote in message
news:dsda36.2po.1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Ryan Langton" <langton@xxxxxxxxxxxxxxxxxx> wrote:
Since the SQL Server already uses Windows authentication, is there anyway
to
use this as their login info for my program as well?
Yes there is. I highly recommend to do this instead using
global variables.
You can query the SQL-Server for the loginname of the current
user by this SQL: SELECT SUser_SName()
If you use that to open a recordset, the only field will contain
the login name.
Cheers
Phil
.
Relevant Pages
- Re: Logging in irrespective of database access
... Sysadmin role members have full permissions, ... SQL Server MVP ... > My problem is that in the Login section of Enterprise Manger I have to> specify that each login has the System Admin ticked under Server Roles> because in SQL 2000 there doesn't seem to a Grant All permissions option> like there used to be in SQL 6.5. ... > What's the point in having the Database Access section if the System Admin> under Server Roles allows you to get into anything?. ... (microsoft.public.sqlserver.server) - Re: Logging in irrespective of database access
... Sysadmin role members have full permissions, ... SQL Server MVP ... > My problem is that in the Login section of Enterprise Manger I have to> specify that each login has the System Admin ticked under Server Roles> because in SQL 2000 there doesn't seem to a Grant All permissions option> like there used to be in SQL 6.5. ... > What's the point in having the Database Access section if the System Admin> under Server Roles allows you to get into anything?. ... (microsoft.public.sqlserver.server) - Re: Logging in irrespective of database access
... Sysadmin role members have full permissions, ... SQL Server MVP ... > My problem is that in the Login section of Enterprise Manger I have to> specify that each login has the System Admin ticked under Server Roles> because in SQL 2000 there doesn't seem to a Grant All permissions option> like there used to be in SQL 6.5. ... > What's the point in having the Database Access section if the System Admin> under Server Roles allows you to get into anything?. ... (microsoft.public.sqlserver.programming) - Re: Logging in irrespective of database access
... Sysadmin role members have full permissions, ... SQL Server MVP ... > My problem is that in the Login section of Enterprise Manger I have to> specify that each login has the System Admin ticked under Server Roles> because in SQL 2000 there doesn't seem to a Grant All permissions option> like there used to be in SQL 6.5. ... > What's the point in having the Database Access section if the System Admin> under Server Roles allows you to get into anything?. ... (microsoft.public.sqlserver.programming) - Re: ODBC in MS Access ignores DSN authorization method
... login doesn't have permissions, you get an error. ... to use a trusted connection or a SQL login, ... >permissions, and instead use the PUBLIC permissions. ... >When the Windows login I am using has access to the database, ... (microsoft.public.sqlserver.odbc) |
|