Display Problem ... HELP

Discussion in 'C#' started by hammer1, Mar 1, 2007.

  1. #1
    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_Message").Value)%>&nbsp;&nbsp;<%=(rsBody.Fields.Item("URL_Dir").Value)%>/ad.asp?cat_id=<%=(rsCat.Fields.Item("CAT_ID").Value)%>&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, Mar 1, 2007 IP
  2. JenniP

    JenniP Peon

    Messages:
    250
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well the error you are getting would indicate to me that rsCat hasn't returned any records.

    Error 800a0bcd means "Either BOF or EOF is true", you wouldnt normally get this on BOF, so its more than likely to be EOF (End of File, or in this case recordset).

    You really should check for EOF before hitting the code to trap this kind of error.

    Jen
     
    JenniP, Mar 2, 2007 IP