as an intermediate noob i would only use 1. the "more efficient" thing sounds bogus
― am0n, Tuesday, 1 September 2009 14:42 (fourteen years ago) link
We're on SQL Server 2005 but I can't imagine it's any different there.
― someone who is ranked fairly highly in an army of poo (Colonel Poo), Tuesday, 1 September 2009 14:44 (fourteen years ago) link
I got my thing to work ^________^
batch file
echo offSet objShell = CreateObject("Wscript.Shell")Echo Please enter password and press returnSet /p var1=osql -d AFW3 -U sa -P password -S TESTSERVER -q "Exec EmployeePasswordLogout @LoginPassword=%var1%"
sql stored proc
CREATE PROC EmployeePasswordLogout (@LoginPassword varchar (10))AsUpdate tblEmployeeset LoginDateTime = nullwhere @LoginPassword = LoginPasswordGO
― bnw, Wednesday, 9 September 2009 16:18 (fourteen years ago) link
Dude seriously
Also what happens if 2 employees by coincidence have the same password?
― Colonel Poo, Wednesday, 9 September 2009 20:27 (fourteen years ago) link
Being logged out while you are still using the database is only a problem if you were to try to enter it again which is pretty rare. But it probably isn't too hard to get username in there too.
― bnw, Wednesday, 9 September 2009 21:10 (fourteen years ago) link