Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 14 su 14
  1. #11
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Originariamente inviato da optime
    non e' questione di 'contenuto': quell'errore dice che il campo *non esiste* nel recordset.
    Infatti in tempi non sospetti chiesi la query...

    Roby

  2. #12
    MESSAGETHREADS e' una tabella o una query/vista?

  3. #13
    Utente di HTML.it L'avatar di fraude
    Registrato dal
    Feb 2004
    Messaggi
    2,870
    Originariamente inviato da Roby_72
    Infatti in tempi non sospetti chiesi la query...

    Roby
    questa è la pagina completa:
    codice:
    <%
    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
    %>

  4. #14
    Utente di HTML.it L'avatar di fraude
    Registrato dal
    Feb 2004
    Messaggi
    2,870
    Originariamente inviato da optime
    MESSAGETHREADS e' una tabella o una query/vista?
    trovato il problema! VVoVe:
    la query iniziale nel dbase era scritta così:
    codice:
    SELECT FORUM_MESSAGES.* FROM FORUM_MESSAGES
    WHERE (((FORUM_MESSAGES.ParentMessage)=0))
    ORDER BY FORUM_MESSAGES.LastThreadPost DESC;
    adesso invece scrivendo campo per campo cioè così:
    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;
    ha funzionato... ma non è lo stesso?

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 © 2026 vBulletin Solutions, Inc. All rights reserved.