|
 |
access_asp thread: ELSE statement redirect not working
Message #1 by "Andy Wischmann" <andy@9...> on Thu, 16 May 2002 08:10:00 -0500
|
|
The routing works perfectly, but if the user puts in the wrong
password, they don't get routed to badpassword.htm page.
---------------------------------------------------------------------------
group=rs.Fields("Group")
If (not rs.BOF) and (not rs.EOF) then
Response.Cookies("Username") = rs.Fields("Username")
Response.Redirect("http://myserver/" + group)
else
Response.Redirect "http://myserver/badpassword.htm"
end if
---------------------------------------------------------------------------
-
a.. Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted.
Requested
operation requires a current record.
/dtsearch/ProcessLogin.asp, line 23
Message #2 by "Jeroen Diderik" <jeroen@i...> on Thu, 16 May 2002 18:12:45 +0200
|
|
Hi,
You are doing a request for the Group field before you check for EOF and
BOF.
So if BOF and EOF are true, you can not request the rs.Fields("Group").
Convert to:
If (not rs.BOF) and (not rs.EOF) then
group=3Drs.Fields("Group")
Response.Cookies("Username") =3D rs.Fields("Username")
Response.Redirect("http://myserver/" + group)
else
Response.Redirect "http://myserver/badpassword.htm"
end if
Gr,
Jeroen Diderik
-----Original Message-----
From: Andy Wischmann [mailto:andy@9...]
Sent: Thursday, May 16, 2002 3:10 PM
To: Access ASP
Subject: [access_asp] ELSE statement redirect not working
The routing works perfectly, but if the user puts in the wrong
password, they don't get routed to badpassword.htm page.
------------------------------------------------------------------------
---
group=3Drs.Fields("Group")
If (not rs.BOF) and (not rs.EOF) then
Response.Cookies("Username") =3D rs.Fields("Username")
Response.Redirect("http://myserver/" + group)
else
Response.Redirect "http://myserver/badpassword.htm"
end if
------------------------------------------------------------------------
---
-
a.. Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted.
Requested
operation requires a current record.
/dtsearch/ProcessLogin.asp, line 23
Message #3 by "Andy Wischmann" <andy@9...> on Thu, 16 May 2002 09:23:18 -0500
|
|
Jeroen,
THANK you very much. IT works perfectly now.
I appreciate your time and help.
Good Karma is coming your way.
Have a good day,
Andy
----- Original Message -----
From: "Jeroen Diderik" <jeroen@i...>
To: "Access ASP" <access_asp@p...>
Sent: Thursday, May 16, 2002 11:12 AM
Subject: [access_asp] RE: ELSE statement redirect not working
Hi,
You are doing a request for the Group field before you check for EOF and
BOF.
So if BOF and EOF are true, you can not request the rs.Fields("Group").
Convert to:
If (not rs.BOF) and (not rs.EOF) then
group=rs.Fields("Group")
Response.Cookies("Username") = rs.Fields("Username")
Response.Redirect("http://myserver/" + group)
else
Response.Redirect "http://myserver/badpassword.htm"
end if
Gr,
Jeroen Diderik
-----Original Message-----
From: Andy Wischmann [mailto:andy@9...]
Sent: Thursday, May 16, 2002 3:10 PM
To: Access ASP
Subject: [access_asp] ELSE statement redirect not working
The routing works perfectly, but if the user puts in the wrong
password, they don't get routed to badpassword.htm page.
------------------------------------------------------------------------
---
group=rs.Fields("Group")
If (not rs.BOF) and (not rs.EOF) then
Response.Cookies("Username") = rs.Fields("Username")
Response.Redirect("http://myserver/" + group)
else
Response.Redirect "http://myserver/badpassword.htm"
end if
------------------------------------------------------------------------
---
-
a.. Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted.
Requested
operation requires a current record.
/dtsearch/ProcessLogin.asp, line 23
|
|
 |