Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Operazione non consentita.

    In questo codice la seconda function, pianta l'elaborazione della pagina per qualche minuto, poi mi restituisce l'errore ASP 0104 - Operazione non consentita.
    Non riesco a capire cosa sto sbagliando. :master:

    Vi posto il codice della pagina:

    codice:
    <%
    'La testata
    Function stampaTestata()
    
    	'Query
    	sql = "SELECT Menu from news GROUP BY Menu"
    	Set rs = Server.CreateObject("ADODB.Recordset")
    	rs.Open sql, conn, 3, 3
    
    	stampaTestata = rs("Menu")
    	
    	'Distrugge il recordset
    	rs.close
    	set rs = nothing
    	
    End Function
    
    'Le informazioni di ogni news
    Function stampaInformazioni()
    	
    	sql = "SELECT * from news ORDER BY id DESC"
    	Set rs1 = Server.CreateObject("ADODB.Recordset")
    	rs1.Open sql, conn, 3, 3
    	
    	While not Rs1.eof
    		link = "dettagli.asp?cod=" & rs1("id")
    		'Compongo le tabelle annidate
    	    str = str & "<table border=0 cellpadding=0 cellspacing=0 width=""300"" height=""100"">" & vblf
    	    str = str & "<tr><td valign=top><div align=""justify"">
    " & Rs1("Titolo") & "
    </div>
    </td></tr>" & vblf
    		str = str & "<table>"
    
    '		for i = 0 to 20 
    '			str = str & "<table border=1 cellpadding=0 cellspacing=0 width='250' height='100'>" & vblf
    '			str = str & "<tr><td valign=top><div align=""justify"">
    Prova Max
    </div>
    </td></tr>" & vblf
    '			str = str & "<table>"
    '		next
    	Wend
    
    	stampaInformazioni = str
    
    	'Distrugge il recordset
    	rs1.close
    	set rs1 = nothing
    	
    End Function
    
        response.write ("<table border=0 cellpadding=0 cellspacing=0 width=""300"" height=""100"">" & vblf)
        response.write ("<tr height=20><td width=12><img src=immagini/blt.gif width=12 height=20 hspace=0 vspace=0 border=0></td><td background=immagini/btm.gif><font class=title>" & stampaTestata & "</font></td><td><img src=immagini/brt.gif width=18 height=20 hspace=0 vspace=0 border=0></td></tr>" & vblf)
        response.write ("<tr><td width=12 background=immagini/blm.gif></td>" & vblf)
        response.write ("<td background=immagini/bbg.gif valign=top><div align=""justify"">
    " & stampaInformazioni & "
    </div>
    </td>" & vblf)
        response.write ("<td width=18 background=immagini/brm.gif></td></tr>" & vblf)
        response.write ("<tr height=6><td><img src=immagini/blb.gif width=12 height=6 hspace=0 vspace=0 border=0></td><td background=immagini/bbm.gif></td><td><img src=immagini/brb.gif width=18 height=6 hspace=0 vspace=0 border=0></td></tr></table>
    " & vblf)
    
    'Chiude la connessione
    Conn.close 
    Set Conn = Nothing
    %>
    Grazie anticipate per i consigli.
    Provare paura per un qualcosa che ti possa capitare nel futuro non ti evita quell'evento,ti fa soltanto vivere un presente sbagliato!

  2. #2
    Moderatore di JavaScript L'avatar di br1
    Registrato dal
    Jul 1999
    Messaggi
    19,998
    Non vedo rs1.MoveNext :master:

    ciao
    Il guaio per i poveri computers e' che sono gli uomini a comandarli.

    Attenzione ai titoli delle discussioni: (ri)leggete il regolamento
    Consultate la discussione in rilievo: script / discussioni utili
    Usate la funzione di Ricerca del Forum

  3. #3
    Azz, hai ragione, vado a modificare e riprovare.

    [EDIT]: grazie br1! Adesso tutto ok!
    Provare paura per un qualcosa che ti possa capitare nel futuro non ti evita quell'evento,ti fa soltanto vivere un presente sbagliato!

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.