Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

ASP coding problem

  • 11-08-2001 11:52pm
    #1
    Closed Accounts Posts: 2,256 ✭✭✭


    <%
    dim objrs
    set objrs = server.createobject("adodb.recordset")
    objrs.open "news", objconn, , , adcmdtable  
    response.write "<td width='549' height='16' valign='top'>"
    response.write "<b>" & objrs("[news title]") & "</b>"
    response.write "</td>"
    response.write "</tr>"
    response.write "<tr>" 
    response.write "<td valign='top' height='97'>" & objrs("news") & "<br>" & _ 
    request.cooks ("userinfo")("user") & "</td>"
    %>
    
    That piece of code brings up the following error

    ADODB.Recordset error '800a0cc1'

    Item cannot be found in the collection corresponding to the requested name or ordinal.

    /tfc/index.asp, line 103

    so this would relate to
    response.write "<b>" & objrs("[news title]") & "</b>"
    

    i've tryed everything i know and i can't fix it, any help would be appreciated.

    i wasn't able to post with cookies spelt proper so i edited to cooks so thats not the error biggrin.gif


    [This message has been edited by Molly (edited 12-08-2001).]


Comments

  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Try renaming [news title] as news_title. Might not like the white space and thus not recognize the table.

    I can't remember if theis is the relevant the error message off hand, but it may be that your table is empty and as a result throwing up the error (you're not trapping an empty rs).
    <font face="Verdana, Arial" size="2">Originally posted by Molly:
    i wasn't able to post with cookies spelt proper so i edited to cooks so thats not the error biggrin.gif</font>

    Very odd...


    "Just because I'm evil doesn't mean I'm not nice." - Charlie Fulton


  • Registered Users, Registered Users 2 Posts: 2,831 ✭✭✭Lucutus


    <font face="Verdana, Arial" size="2">Originally posted by Molly:
    so this would relate to
    response.write "&lt;b&gt;" & objrs("[news title]") & "&lt;/b&gt;"
    

    </font>
    Try :-
    response.write "&lt;b&gt;" & objrs(0) & "&lt;/b&gt;"
    

    To make sure there's something in the recordset.


  • Closed Accounts Posts: 2,256 ✭✭✭Molly


    Thanks for help, there was a couple of erros in there but sorted now smile.gif


Advertisement