Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Display Problem...Help
Old 03-01-2007, 10:25 PM Display Problem...Help
Junior Talker

Posts: 3
Trades: 0
Hi Guys,

I'm having a problem with the following code:

<textarea name="MESSAGE" cols="50" rows="7" class="inputFieldIE" id="textarea"><%=(rsBody.Fields.Item("Forward_Mess age").Value)%>&nbsp;&nbsp;<%=(rsBody.Fields.Item(" URL_Dir").Value)%>/ad.asp?cat_id=<%=(rsCat.Fields.Item("CAT_ID").Valu e)%>&sub_id=<%=(rsSub.Fields.Item("SUB_ID").Value) %>&AD_ID=<%=(rsDetail.Fields.Item("AD_ID").Value)% ></textarea>

The first part of the code work until it hits: /ad.asp?........

The text on my web page is displayed as follows:

Hi there! I saw this article which might interest you. http://www.xyzz.com/ad.asp?cat_id= <font face="Arial" size=2>
<p>ADODB.Field</font> <font face="Arial" size=2>error '800a0bcd'</font>


I hoping that someone here can tell me what I need to change in the code to correct my test display problem.

Thanks,
Hammer1 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-01-2007, 11:29 PM Re: Display Problem...Help
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
rsCat.Fields.Item("CAT_ID").Valu e <--- if you put a space between the U and the E, that's your problem. Other than that, your issue is that your field name is invalid.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 03-02-2007, 02:48 AM Re: Display Problem...Help
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
If you view source of the page in error you will see the rest of the error message as well.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-02-2007, 10:15 AM Re: Display Problem...Help
Junior Talker

Posts: 3
Trades: 0
Hi Gents,

Thanks for the reply. There is no space between the u and e. Don't know why it came out like that when I pasted it.

Chrishirst,

Sorry, I'm sure I understand view source of the page in error you will see the rest of the error message as well.

What I see on the website is:

Hi there! I saw this article which might interest you. http://www.xxyz.com/ad.asp?cat_id= <font face="Arial" size=2>
<p>ADODB.Field</font> <font face="Arial" size=2>error '800a0bcd'</font>
<p>
<font face="Arial" size=2>Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.</font>
<p>
<font face="Arial" size=2>/forwardAd.asp</font><font face="Arial" size=2>, line 219</font>
<script language='javascript'>postamble();</script>

The Source (in View Source) is:

<tr align="left" valign="middle">
<td width="127" valign="top" class="title"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#333333">Message:</font></td>
<td> <font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#333333">
<textarea name="MESSAGE" cols="50" rows="7" class="inputFieldIE" id="textarea">Hi there! I saw this article which might interest you.&nbsp;&nbsp;http://www.xxyz.com/ad.asp?cat_id= <font face="Arial" size=2>
<p>ADODB.Field</font> <font face="Arial" size=2>error '800a0bcd'</font>
<p>
<font face="Arial" size=2>Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.</font>
<p>
<font face="Arial" size=2>/forwardAd.asp</font><font face="Arial" size=2>, line 219</font>
<script language='javascript'>postamble();</script>

I still don't know what to change to fix the problem.
Hammer1 is offline
Reply With Quote
View Public Profile
 
Old 03-02-2007, 12:26 PM Re: Display Problem...Help
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And there is your error

You have either gone past the end of the recordset in a loop or there was no records returned by the query
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-03-2007, 05:14 PM Re: Display Problem...Help
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Hirst is right. Likely the case is the latter...you queried and expected a result where there was none.

Although looking more closely at your code, it appears that you have multiple recordset objects, each containing a single field name. This likely isn't the case. Usually the case is that there is one object containing multiple field names, something like this:
Code:
SQL_Query = "Select Company, Contact, Email from Companies where Company_ID = 7"
RS.Open SQL_Query
if RS.RecordCount > 0 then ' this is done to make sure that there is a recordset with information in it.
    Company = RS.Fields ("Company").Value ' alternatively, just RS ("Company") will work and seems to perform much faster...I haven't seen anything one way or the other that establishes this or disproves it, though.
     Contact = RS.Fields ("Contact").Value
     Email = RS.Fields ("Email").value
end if
RS.Close
As you can see, I used one recordset and retrieved values for three fields from it.

I can't recall off the top of my head if you'll get the same error if you have a misnamed recordset (if I recall correctly, you'll get an Object Required error...Hirst can probably verify), but it certainly isn't helping. The more objects you have open at once, the more strain you put on your server and the worse your script will perform as more and more people access it.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Display Problem...Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19049 seconds with 12 queries