here is the stored procedure (ms sql server):
i want this to check if the record exists, if it does update the login date and return the clientID value. the asp code i'm using is:Code:Alter PROCEDURE "spLoginCheck" /* checks password then if valid updates the lastLogin date field */ ( @loginID varchar(50), @PassWord varchar(20) ) AS if exists(SELECT clientID FROM login WHERE UserName = @loginID AND userPW = @PassWord) Begin UPDATE login SET lastLogIn = GETDATE() WHERE LoginID = @loginID End Return
nothing is being returned to the recordset as i get sent to my login error page. anyone have any thoughts?Code:objRs.Open "exec spLoginCheck LoginID, Password", connNav strClientID = objRs("clientID") 'If a client id was passed back If strClientID <> "" Then Login = True 'set up session variable for login checking on pages Session("clientID") = strClientID Else Login = False End If
also, any good ref books on the subject of stored procs?




Bookmarks