Ciao a tutti,
ho un problema con questo script. In pratica non capisco come mai i commenti non vengano visualizzati. Sono stato tutta la mattinata a scerverlarmi ma nulla da fare

Il codice è il seguente:

codice:
<%@LANGUAGE = VBScript%>

<%
	Dim pag, com
	pag = Request.QueryString("pag")
	com = Request.QueryString("com")
	If IsNumeric(pag) = False Or pag < 1 Then pag = 1
	Call CnOpen()
	Dim SQL
%>
<html>
<head>
<title>Un Blog in ASP</title>
</head>
<body>
<h1>Un Blog in ASP</h1>
<%
	Dim conta, quanti, numero, commenti
	conta = 0
	quanti = 5
	SQL = "SELECT * FROM messaggi ORDER BY mes_id DESC"
	rs.Open SQL, cn, 1
	rs.PageSize = quanti
	rs.AbsolutePage = pag
	While rs.EOF = False And conta < quanti
		SQL = "SELECT COUNT(com_id) AS temp FROM commenti "
		SQL = SQL & "WHERE com_mes = " & rs("mes_id")
		Set numero = cn.Execute(SQL)
%>
<h2><%=rs("mes_titolo")%></h2>



<%=rs("mes_messaggio")%>



Scritto in data: <%=rs("mes_data")%> -
Commenti: <%=numero("temp")%> -
">Aggiungi un commento
<%
		If numero("temp") > 0 Then
%>
-
">Leggi i commenti
<%
		End If
%>

</p>
<%
		If com <> "" And CInt(com) = rs("mes_id") Then
			SQL = "SELECT * FROM commenti WHERE "
			SQL = SQL & "com_mes = " & com & " ORDER BY com_id ASC"
			Set commenti = cn.Execute(SQL)
%>
<blockquote>
<h3>Commenti</h3>
<%
			While commenti.EOF = False
%>


<%=commenti("com_commento")%></p>
<%
				commenti.MoveNext
			Wend
%>
</blockquote>
<%
			Set commenti = Nothing
		End If
		Set numero = Nothing
		conta = conta + 1
		rs.MoveNext
	Wend
%>



Pagina:
<%
	Dim x
	x = 1
	For x = 1 To rs.PageCount
		If CInt(pag) <> x Then
%>
[<%=x%>]
<%
		Else
%>
[<%=x%>]
<%
		End If
	Next
%>
</p>
<%
	rs.Close
%>


Nuovo messaggio</p>
</body>
</html>
<%
	Call CnClose()
%>

Praticamente <%=commenti("com_commento")%> non mostra nessun risultato, però se utilizzo le voci "com_id" o "com_mes", i valori vengono mostrati.