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[ at ]codekabinett.de> wrote in message news:dsda36.2po.1[ at ]pluto.ksw.codekabinett.com...
[Quoted Text] > "Ryan Langton" <langton[ at ]ci.manhattan.ks.us> 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
|