Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 14
  1. #1
    Utente di HTML.it L'avatar di mmaria
    Registrato dal
    Apr 2003
    Messaggi
    594

    Che significa questo errore: Object variable not set

    Ciao sono Maria e lavoro in Asp.
    La pagina ad un certo punto mi visualizza questo errore:

    Microsoft VBScript runtime error '800a005b'
    Object variable not set


    La riga in questione è la seguente:
    out " <tr><td>http://<font color=DarkRed><b>" & rs...& "</b></font>
    " & rs("Desc")


    che significa?
    Grazie per quello che hai fatto...

  2. #2
    Utente di HTML.it L'avatar di 99eros9
    Registrato dal
    Jan 2003
    Messaggi
    2,637
    out cos'è?
    Tala är silver men tiga är guld!
    Pubblica il tuo curriculum
    Segnala il tuo sito
    Ancl

  3. #3
    A prima vista sembra che tu non abbia settato l'oggetto recordset, cioè devi fare:

    set rs=server.createObject("ADODB.recordset")

    prima di poterlo usare........cioè di scrivere rs("qualche_cosa"), rs("qualche_altra_cosa"), ecc....
    E' nato www.lombardiamotori.it

    www.universocase.it: il primo portale italiano di annunci immobiliari gratuiti e autogestiti!

  4. #4
    Utente di HTML.it L'avatar di mmaria
    Registrato dal
    Apr 2003
    Messaggi
    594

    set rs=server.createObject("ADODB.recordset") set rs=server.createObject("ADO

    Ho inserito
    set rs=server.createObject("ADODB.recordset")



    mi dà questo errore:
    ADODB.Fields errore "800a0cc1'
    Impossibile trovare l'oggetto nell'insieme corrispondente al nome o al numero di riferimento richiesto dall'applicazione.



    per questa riga

    out "<td class=greeny valign=top onMouseOver=""this.style.background='F6F6F6';this. style.cursor='hand'"" onMouseOut=""this.style.background='FFFFFF'"" onClick=""window.location.href='forum.asp?forumid= " & rs("ForumID") & "'"">"
    Grazie per quello che hai fatto...

  5. #5
    Non trova rs("forumID") nel recordset, ciò significa che non esiste un campo "forumID" o che non gli dai le istruzioni necessarie per trovarlo, puoi postare l'intera query per recuperare il tuo recordset?
    E' nato www.lombardiamotori.it

    www.universocase.it: il primo portale italiano di annunci immobiliari gratuiti e autogestiti!

  6. #6
    Utente di HTML.it L'avatar di mmaria
    Registrato dal
    Apr 2003
    Messaggi
    594

    Scusa il ritardo... ma il turno in ospedale mi ha impedito di inserire lo script

    E' Lunghissimo... non saprei quale parte inserire.... Provo a mettere l'inizio....
    <%
    Dim sign, numOfForum, numOfMember,numOfTopic, numOfReply, newestMember
    Dim mostActive, mostActiveIn, mostActiveIndex
    Dim category, curCat
    Dim rsMod 'Recordset

    mostActive = 0 'number of users
    mostActiveIndex = 0 'index of the forum
    mostActiveIn = "" 'name of the forum

    '## CHECK MEMBER-ONLY FORUM

    Dim orderby, by, within
    Dim i
    Dim ForumID

    '# GET THE VARIABLES
    orderby = Request("orderby")
    by = Request("by")
    within = Request("within")


    '# SET DEFAULT VALUES
    if orderby = "" OR (orderby <> "LastDate" AND orderby <> "Topic" AND orderby <> "View" AND orderby <> "Replies") then
    orderby = "LastDate"
    end if

    if orderby = "mSN" then
    orderby = "tblMember.mSN"
    End If

    if by = "" OR (by <> "desc" AND by <> "asc") then
    by = "desc"
    end if

    if within = "" OR (within < 0 AND within > 365) then
    within = 365
    end if
    '# END SET










    '## GET TOTAL REGISTERED MEMBERS
    set rs = db.execute("Select COUNT(mID) from tblMember")
    if rs.EOF = false then
    numOfMember = rs.fields.item(0)
    else
    numOfMember = 0
    end if
    set rs = Nothing

    '## GET NUMBER OF TOPICS POSTED
    set rs = db.execute("Select COUNT(PostID) from tblTopic")
    if rs.EOF = false then
    numOfTopic = rs.fields.item(0)
    else
    numOfTopic = 0
    end if
    set rs = Nothing

    '## GET NUMBER OF REPLIES POSTED
    set rs = db.execute("Select COUNT(ReplyID) from tblReply")
    if rs.EOF = false then
    numOfReply = rs.fields.item(0)
    else
    numOfReply = 0
    end if
    set rs = Nothing

    '## GET THE NEWEST MEMBER
    set rs = db.execute("Select mSN from tblMember where mID = (Select MAX(mID) from tblMember)")
    if rs.EOF = false then
    newestMember = rs.fields.item(0)
    else
    newestMember = ""
    end if
    set rs = Nothing

    '## GET NUMBER OF FORUMS ARE MAINTAINED
    set rs = db.execute("Select COUNT(ForumID) from tblForumCat")
    if rs.EOF = false then
    numOfForum = rs.fields.item(0)
    else
    numOfForum = 0
    end if
    set rs = Nothing

    %>
    Grazie per quello che hai fatto...

  7. #7
    Utente di HTML.it L'avatar di mmaria
    Registrato dal
    Apr 2003
    Messaggi
    594

    Ecco la seconda parte...

    <% '# SHOW ALL CATEGORIES
    set category = db.execute("Select * from tblCat Order By CatOrder ASC")

    if category.EOF = false then ' Check to see if this category exists, if existed, begin to show
    out "
    "
    out "<table width=" & vieCSS("MainVieBoardWidth") & "% align=center class=sm cellpadding=4>"
    '# SHOW HEADERS
    out " <tr><td>[<font class=alert>!</font>] http://" & lang.item("foruminde...redTopic") & " | " & lang.item("forumindex_viewTodayTopic") & ""
    out "<td align=right>" & FormatDateTime(Date,1) & " ore: " & FormatDateTime(time,4) & " (Rome Time)"
    out " </tr>"
    out "</table>"

    out "<center>"
    out "<div id=outborder>"
    out " <table width=100% align=center class=border cellpadding=4>"
    out " <tr>"
    out " <td class=header2 width=50% bgcolor=#DFECF9 colspan=2 align=center><font class=h>" & lang.item("forumindex_headerForum") & "</font>"

    out " <td class=header2 width=5% align=center><font class=h>" & lang.item("forumindex_headerTopic") & "</font>"

    out " <td class=header2 width=""25%""><font class=h>" & lang.item("forumindex_headerLastPost") & "</font>"

    out " <td class=header2 width=5% align=center><font class=h>" & lang.item("forumindex_headerReplies") & "</font>"

    out " <td class=header2 width=""15%""><font class=h>@" & lang.item("forumindex_headerModerator") & "</font>"
    out " </tr>"
    '# END SHOW HEADERS

    '# THIS LOOPS THROUGH EACH CATEGORY
    while not category.EOF
    if Request("c") = "" then
    curCat = category("catID")
    else
    curCat = Request("c")
    end if
    '# SHOW CATEGORY NAME
    out "<tr><td class=header colspan=7>"
    out " <a title=""Show subforums in this category"" href=""forumindex.asp?c=" & category("CatID") &""">"
    if CInt(curCat) = CInt(category("catID")) then

    echo "[img][/img]"

    else

    echo "[img][/img]"

    end if
    echo "</a> "
    echo "" & category("CatTitle") & ""
    out "</tr>"
    '# END SHOW CATEGORY NAME

    '# SHOW FORUMS BELONG TO THIS CATEGORY
    if CInt(curCat) = CInt(category("catID")) then
    set rs = db.execute("Select * from tblForumCat where CatID = " & category("CatID") & " ORDER BY ForumOrder ASC ")

    while not rs.EOF

    out "<tr><td class=greeny width=5% align=center>"
    '# SHOW FORUM STATUS
    if wasHere = true then

    set tmp = db.execute("Select LastDate from tblTopic where ForumID = " & rs("ForumID") & " AND LastDate = (Select MAX(LastDate) from tblTopic where ForumID = " & rs("ForumID") & ")")

    if rs("isLocked") = false then

    if tmp.EOF = false then

    if CDATE(tmp("LastDate")) > CDATE(lastvisit) then
    out "[img][/img]"
    else
    out "[img][/img]"
    end if

    else

    out "[img][/img]"

    end if

    else

    out "[img][/img]"

    end if

    else

    out "[img][/img]"

    end if
    set tmp = Nothing
    out "</td>"
    '# END SHOW FORUM STATUS











    set rs=server.createObject("ADODB.recordset")







    '# SHOW FORUM NAME
    out "<td class=greeny valign=top onMouseOver=""this.style.background='F6F6F6';this. style.cursor='hand'"" onMouseOut=""this.style.background='FFFFFF'"" onClick=""window.location.href='forum.asp?forumid= " & rs("ForumID") & "'"">"
    out " <table width=100% cellpadding=0 cellspacing=0 class=sm>"
    out " <tr><td>http://<font color=DarkRed><b>" & rs...& "</b></font>
    " & rs("Desc")
    if Request.cookies("isLogged")("group") = "1" then
    out " <td width=5% align=right valign=top>[img][/img]"

    out " <td width=5% align=right valign=top>[img][/img]"
    End If

    out " <td width=5% align=right valign=top>[img][/img]"

    out " </tr>"
    out " </table>"

    'show how many active users in this forum at the moment
    set tmp = db.execute("Select COUNT(VisitorForum) as Total from tblActiveUser where VisitorForum = " & rs("ForumID"))

    if tmp("Total") > mostActive then 'get most active users
    mostActive = tmp("Total")
    mostActiveIndex = rs("ForumID")
    mostActiveIn = rs("Category")
    End If

    if tmp("total") > 0 then
    out "
    <font class=h>Active Users: " & tmp("Total") & "</font>"
    End If
    set tmp = Nothing
    'end show how many
    out "</td>"

    '# END SHOW FORUM NAME

    '# SHOW TOTAL POSTS
    out "<td class=greeny align=center>"

    set rsCat = db.execute("Select COUNT(ForumID) as Total from tblTopic where ForumID = " & rs("ForumID") & " AND isReviewed = 0")

    if rsCat.EOF = false then
    echo rsCat("Total")
    else
    echo "0"
    end if

    set rsCat = Nothing
    out "</td>"
    '# END SHOW TOTAL POSTS

    '# SHOW LAST POST
    Dim postList
    postList = ""
    out "<td class=greeny align=left valign=top>"
    set tmp = db.execute("Select Top 1 tblMember.mSN, tblTopic.PostID, tblTopic.Topic, tblTopic.LastDate, tblTopic.Replies from tblTopic, tblMember where tblTopic.ForumID = " & rs("ForumID") & " AND tblTopic.mID = tblMember.mID AND tblTopic.isReviewed = 0 ORDER BY LASTDATE DESC")


    if tmp.EOF = false then
    while not tmp.EOF

    out "" & tmp("Topic") & ""
    out "
    "
    set i = db.execute("Select tblMember.mSN from tblReply, tblMember where ReplyTo = " & tmp("PostID") & " AND DateTime = (SELECT MAX(DateTime) from tblReply where ReplyTo = " & tmp("PostID") & ") AND tblReply.mID = tblMember.mID")
    If i.EOF = True then
    out lang.item("forumindex_by") & ": " & tmp("mSN") & ""
    Else
    out lang.item("forumindex_by") & ": " & i("mSN") & ""
    End If
    set i = Nothing
    out "
    "
    out fDate(tmp("LastDate")) & " " & fTime(tmp("LastDate")) & "
    "

    tmp.moveNext
    wend

    End If

    out "</td>"
    '# END SHOW LAST POST

    '# SHOW TOTAL REPLIES OF THIS FORUM
    out "<td class=greeny align=center>"
    set rsCat = db.execute("Select COUNT(ReplyTo) as Total from tblReply,tblTopic where tblTopic.ForumID = " & rs("ForumID") & " AND tblReply.ReplyTo = tblTopic.PostID")

    if rsCat.EOF = false then
    echo rsCat("Total")
    else
    echo "0"
    end if
    set rsCat = Nothing
    out "</td>"
    '# END SHOW TOTAL REPLIES

    '#SHOW MODERATORS
    out "<td class=greeny valign=top>"

    set rsMod = db.execute("Select tblMember.mSN,tblMember.mID from tblModerator,tblMember where tblMember.mID = tblModerator.mID AND tblModerator.ForumID = " & rs("ForumID"))
    while not rsMod.EOF

    out "" & rsMod("mSN") & ""

    rsMod.moveNext
    if rsMod.EOF = false then
    echo ", "
    end if
    wend
    set rsMod = Nothing
    '# END SHOW MODERATORS

    out "</tr>"
    rs.moveNext
    wend
    set rs = Nothing

    end if
    '#END SHOW FORUMS BELONGS TO THIS CATEGORY

    category.moveNext
    wend
    set category = Nothing
    '# END SHOW CATEGORY
    out "<tr><td colspan=6>" & lang("forumindex_mark") & "</tr>"
    else

    Response.redirect "portal.asp" 'redirect to main forums since this category does not exist

    end if
    '## SHOW HAPPY BIRTHDAY
    out "<tr>"
    out " <td colspan=7 class=header>" & sign & " <font class=h>Happy Birthday</font>"
    out "</tr>"

    out "<tr>"
    out " <td width=5% class=greeny align=center>[img][/img]"
    out " </td>"

    out " <td colspan=5 class=greeny>"
    out " &middot;"
    set rs = db.execute("Select tblMember.mSN,tblMember.isModerator,mGroup from tblMember,tblMemberInfo where tblMember.mID = tblMemberInfo.mID AND Month(tblMemberInfo.mBirth) = " & Month(Date) & " AND Day(tblMemberInfo.mBirth) = " & Day(Date) & " ORDER BY tblMember.mSN ASC")
    if rs.EOF = false then
    echo lang("forumindex_wish")
    while not rs.EOF
    echo "<a href=""getmember.asp?msn=" & rs("mSN") & """"
    if rs("mGroup") = 1 then Response.write " class=pa" End If
    echo ">"
    if rs("isModerator") = true then echo "" End If
    Response.write rs("mSN")
    if rs("isModerator") = true then echo "
    " End If
    echo "</a>"

    rs.moveNext
    if rs.EOF = false then Response.write ", " End If
    wend
    else
    Response.write lang("forumindex_noBirthdayToday")
    End If
    set rs = Nothing
    out "</tr>"
    Grazie per quello che hai fatto...

  8. #8
    Utente di HTML.it L'avatar di mmaria
    Registrato dal
    Apr 2003
    Messaggi
    594

    Edecco terza ed ultima parte

    '## END HAPPY BIRTHDAY
    '# SHOW WHOIS ONLINE
    out "<tr>"
    out " <td colspan=7 class=header>" & sign & " <font class=h>" & _
    lang.item("forumindex_headerWhoOnline") & "</font>"
    out "</tr>"

    out "<tr>"
    out " <td width=5% class=greeny align=center>[img][/img]"
    out " </td>"

    out " <td colspan=5 class=greeny>"

    set rs = db.execute("SELECT COUNT(VisitorID) as Total from tblActiveUser")
    echo "&middot; "
    if rs("Total") > 1 then
    echo Replace(Replace(lang.item("forumindex_totalOnlineU sers"),"%u",rs("Total")),"%m",ABS(visitorTimeOut))
    else
    echo Replace(Replace(lang.item("forumindex_totalOnlineU ser"),"%u",rs("Total")),"%m",ABS(visitorTimeOut))
    end if

    echo " " & " [ "

    set rs = Nothing


    set rs = db.execute("SELECT COUNT(VisitorID) as Total from tblActiveUser where VisitorPos = 0")
    echo rs("Total") & " "
    if rs("Total") > 1 then
    echo lang.item("forumindex_guests")
    else
    echo lang.item("forumindex_guest")
    end if
    echo " : "
    set rs = Nothing

    set rs = db.execute("SELECT COUNT(VisitorID) as Total from tblActiveUser where VisitorPos = 1")
    echo rs("Total") & " "
    if rs("Total") > 1 then
    echo lang.item("forumindex_members")
    else
    echo lang.item("forumindex_member")
    end if
    echo " : "
    set rs = Nothing

    set rs = db.execute("SELECT COUNT(VisitorID) as Total from tblActiveUser where VisitorPos = 2")
    echo rs("Total") & " "
    if rs("Total") > 1 then
    echo "<font class=h>" & lang.item("forumindex_moderators") & "</font>"
    else
    echo "<font class=h>" & lang.item("forumindex_moderator") & "</font>"
    end if
    echo "
    "
    echo " : "
    set rs = Nothing

    set rs = db.execute("SELECT COUNT(VisitorID) as Total from tblActiveUser where VisitorPos = 3")
    echo rs("Total") & " "
    if rs("Total") > 1 then
    echo "<font class=orange>" & lang.item("forumindex_admins") & "</font>"
    else
    echo "<font class=orange>" & lang.item("forumindex_admin") & "</font>"
    end if
    echo "
    "
    set rs = Nothing

    echo " ]
    "

    echo "&middot; " & lang.item("forumindex_onlineUser") & ": "

    set rs = db.execute("SELECT VisitorMSN,VisitorPos from tblActiveUser where VisitorMSN <> ''")
    if rs.EOF = false then

    while not rs.EOF
    echo "<a href=""getmember.asp?msn=" & rs("VisitorMSN") & """"
    if rs("VisitorPos") = 3 then
    echo " class=pa"
    End If
    echo ">"
    if rs("VisitorPos") >= 2 then
    echo ""
    end if

    echo rs("VisitorMSN")

    if rs("VisitorPos") >= 2 then
    echo "
    "
    end if
    echo "</a>"
    rs.moveNext

    if rs.EOF = false then
    echo ", "
    end if

    wend
    else

    echo lang("forumindex_noUserOnline")

    end if
    set rs = Nothing

    'Show most active users in
    if mostActive > 0 then
    out "
    &middot; Most active users in " & mostActiveIn & ""
    End if
    'End
    out "</tr>"
    '## END SHOW WHOIS ONLINE

    '## SHOW FORUM STATISTICS
    out "<tr>"
    out " <td colspan=7 class=header>" & sign & " " & "<font class=h>" & lang.item("forumindex_headerStatistic") & "</font>"
    out "</tr>"

    out "<tr>"
    out " <td width=5% class=greeny align=center>[img][/img]"
    out " <td colspan=5 class=greeny>"
    out " <p style=""line-height:17px"">"
    out " &middot; "
    if numOfForum > 1 then
    echo Replace(lang.item("forumindex_numOfForums"),"%d",n umOfForum)
    else
    echo Replace(lang.item("forumindex_numOfForum"),"%d",nu mOfForum)
    end if
    echo "
    "
    echo "&middot; "
    if numOfMember > 1 then
    echo Replace(Replace(lang.item("forumindex_numOfMembers "),"%d",numOfMember),"%m",newestMember)
    else
    echo Replace(Replace(lang.item("forumindex_numOfMember" ),"%d",numOfMember),"%m",newestMember)
    end if

    echo "
    "
    out " &middot; "

    if numOfTopic + numOfReply > 1 then
    echo Replace(lang.item("forumindex_ourUserHave"),"%d",n umOfTopic+numOfReply)
    else
    echo Replace(lang.item("forumindex_ourUserHas"),"%d",nu mOfTopic+numOfReply)
    end if
    echo " " & ", " & lang.item("forumindex_including")
    echo " <font class=alert>" & numOfTopic & "</font> "

    if numOfTopic > 1 then
    echo lang.item("forumindex_topics")
    else
    echo lang.item("forumindex_topic")
    end if
    echo " " & lang.item("forumindex_with")
    echo " <font class=alert> " & numOfReply & "</font> "

    if numOfReply > 1 then
    echo lang.item("forumindex_replies")
    else
    echo lang.item("forumindex_reply")
    end if
    echo ".</font>
    "
    echo " </p>"
    out " </td>"
    out "</tr>"
    out "</table></div>
    "
    '## END SHOW FORUM STATISTICS

    '## SHOW QUICK LOGIN BOX
    if Request.cookies("isLogged")("mSN") = "" then
    out "<div id=outborder>"
    out "<table width=100% align=center class=border cellpadding=3 class=sm>"
    out " <tr>"
    out " <td class=header colspan=2> <font class=h>" & _
    lang.item("forumindex_headerQuickLogin") & "</font>"
    out " </tr>"
    out " <tr><td class=blue align=center>"
    out " <form action=""login_action.asp"" method=""POST"" onSubmit=""referer.value = document.URL"">"
    out " <table border=0 class=sm cellpadding=5>"
    out " <tr>"
    out " <td>" & lang.item("forumindex_username") & ""
    out " <td><input type=""text"" name=""user"" class=shadow size=20>"
    out " <td>" & lang.item("forumindex_password") & ""
    out " <td><input type=""password"" name=""pwd"" class=shadow size=20>"
    out " <td><input type=""submit"" value="" " & lang.item("forumindex_butLogin") & " "" class=bluebut> " & lang.item("forumindex_linkLostPassword") & ""
    out " </tr>"
    out " <input type=hidden name=""task"" value=""login"">"
    out " <input type=hidden name=""referer"">"
    out " </form>"
    out " </table>"
    out "</table>"
    out "</div>"
    End If
    '## END QUICK LOGIN BOX

    out "

    "

    '## SHOW LEGENDS FOR ICONS
    out "<table width=40% align=center class=sm>"
    out " <tr>"
    out " <td align=center>[img][/img] " & lang.item("forumindex_imgNewPost")
    out " <td align=center>[img][/img] " & lang.item("forumindex_imgNoNewPost")
    out " <td align=center>[img][/img] " & lang.item("forumindex_imgLockedForum")
    out " </tr>"
    out "</table>"
    '## END LEGENDS

    '### END OF FILE
    %>
    Grazie per quello che hai fatto...

  9. #9
    Ciao Maria.......sto dando un'occhiata al tuo post e la cosa è piuttosto complicata, come ogni volta che si deve fare il debug di un'applicazione scritta in modo visuale ....... oltretutto devo averti anche portato fuori strada con quel suggerimento, pensavo che avessi scritto il codice di tuo pugno.

    Probabilmente l'aggiunta della mia riga non va bene, prova, se vuoi, a toglierla di nuovo e a postare il messaggio di errore e la riga alla quale esattamente si riferisce.........poi si può tentare di vedere dov'è il problema

    E' nato www.lombardiamotori.it

    www.universocase.it: il primo portale italiano di annunci immobiliari gratuiti e autogestiti!

  10. #10
    ........e in effetti l'oggetto rs veniva creato in questa riga, poco più sopra:

    codice:
    set rs = db.execute("Select * from tblForumCat where CatID = " & category("CatID") & " ORDER BY ForumOrder ASC ")
    La spiegazione dell'errore può essere più di una, quando sei in linea vediamo, magari anche con l'aiuto di qualcuno più bravo di me (cioè quasi chiunque, eheheh)......

    A più tardi.
    E' nato www.lombardiamotori.it

    www.universocase.it: il primo portale italiano di annunci immobiliari gratuiti e autogestiti!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.