Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error when thre is no data 1

Status
Not open for further replies.

aarellano

MIS
Oct 22, 2007
168
0
0
US
Hello,

I have an asp page that loads dynamic data from one of my servers. In the morning when there is no data in the file when I call my asp page I get the following error

Code:
Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
recap.asp, line 25
line 25 is the rs.Movefirst

I tried to enter is null and = 0
Code:
if dddpva is null then response.Redirect("[URL unfurl="true"]http://http://myserver/data/myredirect.asp")[/URL]
on line 23 before the rs.Movefirst

but that did not work

how could I redirect to a new page if there is no data
 
Insert this line above the rs.MoveFirst line:

Code:
If RS.EOF Then response.Redirect("[URL unfurl="true"]http://http://myserver/data/myredirect.asp")[/URL]


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top