Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 user login checks its ipm

Author  Topic 

abuzar
Starting Member

20 Posts

Posted - 2013-12-19 : 12:22:26
i need a querry that when ever user log into my window app the username of the logged in user should get inserted in my table tbl_userlogindetails.

"select * from tbl_userlogin where userlogin = '" + txtusername.Text + "'and password='" + txtpass.Text + "'";
right now i am just checking it with this querry at front end but i need to insert also the same in another table on the same time.
regards,
abu

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-12-19 : 13:26:49
assuming loggedin user uses Windows credentials (domain account) you can use SUSER_SNAME() function to capture the info

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

abuzar
Starting Member

20 Posts

Posted - 2013-12-19 : 13:45:26
what if i want to capture login info of the userlogin tables not the windows one
Go to Top of Page
   

- Advertisement -