Infatti in tempi non sospetti chiesi la query...Originariamente inviato da optime
non e' questione di 'contenuto': quell'errore dice che il campo *non esiste* nel recordset.![]()
Roby
Infatti in tempi non sospetti chiesi la query...Originariamente inviato da optime
non e' questione di 'contenuto': quell'errore dice che il campo *non esiste* nel recordset.![]()
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
MESSAGETHREADS e' una tabella o una query/vista?
questa è la pagina completa:Originariamente inviato da Roby_72
Infatti in tempi non sospetti chiesi la query...![]()
Robycodice:<% session.lcid=1040 Function isBlank(Value) if isNull(Value) then bAns = true else bAns = trim(Value) = "" end if isBlank = bAns end function Function FixNull(Value) if isNull(Value) then sAns = "" else sAns = trim(Value) end if FixNull = sAns end function cmd.CommandText = "MESSAGETHREADS" cmd.CommandType = 4 iPageSize = 20 iPage = cint(Request.QueryString("Page")) if iPage = 0 then iPage = 1 rs.open cmd, ,1, 3 if not rs.Eof and not rs.bof then rs.MoveLast lTotalRecords = rs.RecordCount iTotalPages = int(lTotalRecords / iPageSize) if lTotalRecords MOD iPageSize <> 0 then iTotalPages = iTotalPages + 1 if lTotalRecords <= iPageSize then rs.MoveFirst bOnePage = true lPageEnd = lTotalRecords lPageStart = 1 iTotalPages = 1 else lPageStart = ((iPage - 1) * iPageSize) + 1 lPageEnd = lPageStart + (iPageSize - 1) if lPageEnd >= lTotalRecords Then lPageEnd = lTotalRecords bLastPage = true end if if iPage > 1 then rs.AbsolutePosition = ((iPage - 1) * iPageSize) + 1 else rs.MoveFirst end if end if else bNoRecords = true end if if not bNoRecords then response.write " Pagina " & iPage & " di " & iTotalPages & " " end if if bNoRecords then response.write "<center><TD COLSPAN = 4>Non ci sono, al momento, ticket da consultare.</TD></center>" else for lCtr = lPageStart to lPageEnd response.write "<TD>" & rs("temp") & "</A></FONT></TD>" response.write "<TD>" & rs("Topic") & "" response.write " <TD>" response.write "<A HREF = 'mailto:" & rs("AuthorEmail") & "'>" & rs("AuthorName") & "</A>" response.write "</FONT></TD>" response.write "</TD><TD ALIGN = LEFT>" & rs("ReplyCount") & "</FONT></TD>" response.write "</TD><TD>" & rs("LastThreadPost") & "</FONT></TD></TR>" rs.movenext Next end if response.write "</TABLE>" if bOnePage = false and bNoRecords = false then response.write "<TABLE WIDTH = '100%'><TR><TD></TD></TR><TR><TD WIDTH = '10%'></TD><TD WIDTH = '60%'>" if iPage > 1 then sPrevQuery = "Page=" & iPage - 1 response.write "<A HREF = 'default.asp?" & sPrevQuery & "'><< Pagina Precedente</A>" else response.write "" end if response.write "</TD><TD VALIGN = TOP NOWRAP>" if bLastPage = false then sNextQuery = "Page=" & iPage + 1 response.write "<A HREF = 'default.asp?" & sNextQuery & "'>Pagina successiva >></A>" else response.write "" end if response.write "<TD WIDTH = '10%'></TD>" response.write "</TD></TR></TABLE>" response.write " <CENTER><FONT SIZE =-1>" for iCtr = 1 to iTotalPages sPageQuery = "Page=" & iCtr & sQuery if iCtr <> iPage then response.write "<A HREF = 'default.asp?" & sPageQuery & "'>" else response.write "" end if response.write iCtr if iCtr <> iPage then response.write "</A>" else response.write "" end if if iCtr < iTotalPages then response.write "|" Next response.write "</FONT></CENTER>" end if %>
trovato il problema!Originariamente inviato da optime
MESSAGETHREADS e' una tabella o una query/vista?VVoVe:
la query iniziale nel dbase era scritta così:adesso invece scrivendo campo per campo cioè così:codice:SELECT FORUM_MESSAGES.* FROM FORUM_MESSAGES WHERE (((FORUM_MESSAGES.ParentMessage)=0)) ORDER BY FORUM_MESSAGES.LastThreadPost DESC;ha funzionato... ma non è lo stesso?codice:SELECT FORUM_MESSAGES.temp, FORUM_MESSAGES.ID, FORUM_MESSAGES.AuthorName, FORUM_MESSAGES.AuthorEmail, FORUM_MESSAGES.Topic, FORUM_MESSAGES.ReplyCount, FORUM_MESSAGES.ReplyCount, FORUM_MESSAGES.LastThreadPost FROM FORUM_MESSAGES WHERE (((FORUM_MESSAGES.ParentMessage)=0)) ORDER BY FORUM_MESSAGES.LastThreadPost DESC;![]()