|
 |
asp_databases thread: page that posts to itself will not process anything past the 1st response.write
Message #1 by "Dave Wray" <threeflush@h...> on Mon, 17 Sep 2001 06:28:11
|
|
I have a search.asp page that posts to itself 3 <form> variables.
However, once the Submit button is pressed I receive the message error
'80020009'
Exception occurred.
/config.asp, line 15
Config.asp is a simply a configuration page that loads all of the images
and format and is executed by search.asp with the Server.Execute call.
line 15 happens to be the first Response.Write object of the config.asp
page and is simply loading the first image via its recordset.
config.asp and search.asp both open and close a unique recordset object
while executing but config.asp is actually executed before search.asp can
open its recordset. It works fine when I initially enter the search page
but when it posts to itself, config.asp cannot write even the first
Response.write of its recordset.
any insight is much appreciated.
Message #2 by David Cameron <dcameron@i...> on Mon, 17 Sep 2001 15:27:32 +1000
|
|
Check for EOF in the recordset. I always seem to get this error when I am
attempting to read data from a recordset where rs.EOF.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Dave Wray [mailto:threeflush@h...]
Sent: Monday, 17 September 2001 4:28 PM
To: ASP Databases
Subject: [asp_databases] page that posts to itself will not process
anything past the 1st response.write
I have a search.asp page that posts to itself 3 <form> variables.
However, once the Submit button is pressed I receive the message error
'80020009'
Exception occurred.
/config.asp, line 15
Config.asp is a simply a configuration page that loads all of the images
and format and is executed by search.asp with the Server.Execute call.
line 15 happens to be the first Response.Write object of the config.asp
page and is simply loading the first image via its recordset.
config.asp and search.asp both open and close a unique recordset object
while executing but config.asp is actually executed before search.asp can
open its recordset. It works fine when I initially enter the search page
but when it posts to itself, config.asp cannot write even the first
Response.write of its recordset.
any insight is much appreciated.
Message #3 by "Ken Schaefer" <ken@a...> on Mon, 17 Sep 2001 16:13:51 +1000
|
|
Please post line 15
Possibly the Recordset is .EOF
Possibly you are trying to perform a function on a NULL value
Possibly...
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Dave Wray" <threeflush@h...>
Subject: [asp_databases] page that posts to itself will not process anything
past the 1st response.write
: I have a search.asp page that posts to itself 3 <form> variables.
: However, once the Submit button is pressed I receive the message error
: '80020009'
: Exception occurred.
: /config.asp, line 15
:
: Config.asp is a simply a configuration page that loads all of the images
: and format and is executed by search.asp with the Server.Execute call.
:
: line 15 happens to be the first Response.Write object of the config.asp
: page and is simply loading the first image via its recordset.
:
: config.asp and search.asp both open and close a unique recordset object
: while executing but config.asp is actually executed before search.asp can
: open its recordset. It works fine when I initially enter the search page
: but when it posts to itself, config.asp cannot write even the first
: Response.write of its recordset.
:
: any insight is much appreciated.
Message #4 by "Dave Wray" <threeflush@h...> on Mon, 17 Sep 2001 07:27:19
|
|
Here is line 15:
<%
Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
%>
this loads fine when the page is initially called....it is not NULL...
thanks
> Please post line 15
>
> Possibly the Recordset is .EOF
> Possibly you are trying to perform a function on a NULL value
> Possibly...
>
> Cheers
> Ken
Message #5 by "Dave Wray" <threeflush@h...> on Mon, 17 Sep 2001 07:22:49
|
|
i tested this and it returned true. but then I tested rs.BOF and this
also returned true. how can this be?
here's my test
if rs.EOF then
Response.Write "rs.EOF is true"
else
Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
end if
*BUT* this also returns true
if rs.BOF then
Response.Write "rs.BOF is true"
else
Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
end if
> Check for EOF in the recordset. I always seem to get this error when I am
> attempting to read data from a recordset where rs.EOF.
>
> regards
> David Cameron
> nOw.b2b
> dcameron@i...
>
> -----Original Message-----
> From: Dave Wray [mailto:threeflush@h...]
> Sent: Monday, 17 September 2001 4:28 PM
> To: ASP Databases
> Subject: [asp_databases] page that posts to itself will not process
> anything past the 1st response.write
>
>
> I have a search.asp page that posts to itself 3 <form> variables.
> However, once the Submit button is pressed I receive the message error
> '80020009'
> Exception occurred.
> /config.asp, line 15
>
> Config.asp is a simply a configuration page that loads all of the images
> and format and is executed by search.asp with the Server.Execute call.
>
> line 15 happens to be the first Response.Write object of the config.asp
> page and is simply loading the first image via its recordset.
>
> config.asp and search.asp both open and close a unique recordset object
> while executing but config.asp is actually executed before search.asp
can
> open its recordset. It works fine when I initially enter the search
page
> but when it posts to itself, config.asp cannot write even the first
> Response.write of its recordset.
>
> any insight is much appreciated.
>
>
Message #6 by "Ken Schaefer" <ken@a...> on Mon, 17 Sep 2001 16:44:10 +1000
|
|
Go straight to the source:
http://msdn.microsoft.com/library/?url=/library/en-us/ado270/htm/mdprobof.as
p?frame=true
<quote>
If you open a Recordset object containing no records, the BOF and EOF
properties are set to True
</quote>
So a recordset with no records will be both .BOF and .EOF at the same time.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Dave Wray" <threeflush@h...>
Subject: [asp_databases] RE: page that posts to itself will not process an-
ything past the 1st response.write
: i tested this and it returned true. but then I tested rs.BOF and this
: also returned true. how can this be?
:
: here's my test
:
: if rs.EOF then
: Response.Write "rs.EOF is true"
: else
: Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
: end if
:
: *BUT* this also returns true
:
: if rs.BOF then
: Response.Write "rs.BOF is true"
: else
: Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
: end if
:
:
: > Check for EOF in the recordset. I always seem to get this error when I
am
: > attempting to read data from a recordset where rs.EOF.
: >
: > regards
: > David Cameron
: > nOw.b2b
: > dcameron@i...
: >
: > -----Original Message-----
: > From: Dave Wray [mailto:threeflush@h...]
: > Sent: Monday, 17 September 2001 4:28 PM
: > To: ASP Databases
: > Subject: [asp_databases] page that posts to itself will not process
: > anything past the 1st response.write
: >
: >
: > I have a search.asp page that posts to itself 3 <form> variables.
: > However, once the Submit button is pressed I receive the message error
: > '80020009'
: > Exception occurred.
: > /config.asp, line 15
: >
: > Config.asp is a simply a configuration page that loads all of the images
: > and format and is executed by search.asp with the Server.Execute call.
: >
: > line 15 happens to be the first Response.Write object of the config.asp
: > page and is simply loading the first image via its recordset.
: >
: > config.asp and search.asp both open and close a unique recordset object
: > while executing but config.asp is actually executed before search.asp
: can
: > open its recordset. It works fine when I initially enter the search
: page
: > but when it posts to itself, config.asp cannot write even the first
: > Response.write of its recordset.
: >
: > any insight is much appreciated.
Message #7 by David Cameron <dcameron@i...> on Mon, 17 Sep 2001 16:30:36 +1000
|
|
BOF & EOF returning true can only mean one thing. You have an empty
recordset, ie you are at both the end and the start of your recordset. So
find out why you have an empty recordset. Might also be a good idea to add
in some error handling.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: Dave Wray [mailto:threeflush@h...]
Sent: Monday, 17 September 2001 5:23 PM
To: ASP Databases
Subject: [asp_databases] RE: page that posts to itself will not process
an- ything past the 1st response.write
i tested this and it returned true. but then I tested rs.BOF and this
also returned true. how can this be?
here's my test
if rs.EOF then
Response.Write "rs.EOF is true"
else
Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
end if
*BUT* this also returns true
if rs.BOF then
Response.Write "rs.BOF is true"
else
Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
end if
Message #8 by "Dave Wray" <threeflush@h...> on Mon, 17 Sep 2001 14:22:03
|
|
Thanks for all your help!
Dave Wray
> BOF & EOF returning true can only mean one thing. You have an empty
> recordset, ie you are at both the end and the start of your recordset. So
> find out why you have an empty recordset. Might also be a good idea to
add
> in some error handling.
>
> regards
> David Cameron
> nOw.b2b
> dcameron@i...
>
> -----Original Message-----
> From: Dave Wray [mailto:threeflush@h...]
> Sent: Monday, 17 September 2001 5:23 PM
> To: ASP Databases
> Subject: [asp_databases] RE: page that posts to itself will not process
> an- ything past the 1st response.write
>
>
> i tested this and it returned true. but then I tested rs.BOF and this
> also returned true. how can this be?
>
> here's my test
>
> if rs.EOF then
> Response.Write "rs.EOF is true"
> else
> Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
> end if
>
> *BUT* this also returns true
>
> if rs.BOF then
> Response.Write "rs.BOF is true"
> else
> Response.Write "<IMG src="& Trim(rs("toolbar")) & ">"
> end if
>
>
|
|
 |