Hi Everyone,

It seems that most of the time I have to login twice with the following login
page. I would appreciate very much anyone's suggestion or solution. Thank


Const adModeReadWrite = 3
Dim Conn, rsUser, nEmpID, nUserName

If Len(Request.Form) > 0 then
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Mode = adModeReadWrite
Conn.Open Application("ApplBlaBla")
Set rsUser = server.CreateObject("ADODB.Recordset")
Conn.sp_Emp_login Request.Form("username"), Request.Form("password"), rsUser

If Not rsUser.EOF then
nEmpID = rsUser("employee_ID)
End If

If Ucase(nUserName) = Ucase(Request.Form("username")) then
With Response
.Cookies("I2B")("empid") = nEmpID
.Cookies("I2B")("Expires") = CDate("12/31/2001") '12/31/2001 is made
End With
'response.redirect to some page
'login error
End If

rsUser.Close: set rsUser = nothing
Conn.Close: Set Conn = nothing