codice:
public function QueryExec(strSql,Paginazione,PageSize)
		on error resume next
	
		rs = Server.CreateObject("ADODB.Recordset") 
		Response.Write strSql
		Response.End
		set rs = cn.execute(strSql)
		
		if Paginazione then
			Pagina PageSize
		end if
		
		if err.number = 0 then
			'if rs.RecordCount > 0 then		
				QueryExec = vbNullString
			'end if
		else
			QueryExec = err.Description
		end if
	end function


strSql = "select messaggi.*,tipologie_msg.Tipologia," & _
								"tipologie_msg.Descrizione from messaggi,tipologie_msg " & _
								"where tipologie_msg.Id = 1 and Id_Utente_Destinatario=" & _
								cstr(IdUtente)

if strSql <> vbNullString then
			Connetti "root", "massimo"
			QueryExec strSql,false,0			
			strSql = vbNullString
		end if


response.write rs(0)