Pagina 3 di 3 primaprima 1 2 3
Visualizzazione dei risultati da 21 a 25 su 25
  1. #21
    Utente di HTML.it L'avatar di [trodat]
    Registrato dal
    Oct 2004
    Messaggi
    2,135
    Originariamente inviato da imente
    si chiama DELETE ed è una query SQL

    capisco il problema
    "come faccio ad individuare i record di un CERTO evento?"

    non si può perchè lo script è fatto male

    già l'idea di fare un record per ogni giorno è folle.
    in più crea questo problema.
    Questo credo sia risolto perchè ho previsto per ciascun evento un IDNumeroEvento... quindi è stato sufficiente aggiungere alla query DELETE la condizione ... and IDNumeroEvento ="&quellocheè... e funziona perfettamente...

    Ciao e grazie per il prezioso aiuto

  2. #22
    certo.

    va benissimo...

    l'unica cosa è che avevo capito che usavi una INSERT, con una UPDATE non vedo come si possano creare doppioni...
    san imente saluta

    * http://simonecingano.it *

  3. #23
    Utente di HTML.it L'avatar di [trodat]
    Registrato dal
    Oct 2004
    Messaggi
    2,135
    Ecco il codice che utilizzo adesso:
    codice:
    strSQL = "Update message set odm = '"&strODM&"', DueDate = #"&strDUEDATE&"#, DueDate2 = #"&strDUEDATE2&"# where ID = " &Request.Form("ID")
      objCONN.execute strSQL
      
      SQLDown = "Delete * from message where DueDate = #"&strDUEDATE&"# and DueDate2 = #"&strDUEDATE2&"# and IdNumeroEvento = "&IdNumeroEvento
      objCONN.execute SQLDown
     
    for i = 0 to datediff("d",cDate(strDUEDATE),cDate(strDUEDATE2)) step 1
      sSql = "INSERT INTO message (...) values (...)"
      objCONN.execute sSQL
    next
    Si è aggiunto un problema che prima non c'era... adesso nella visualizzazione del calendario, anche se per quel giorno ho più eventi registrati regolarmente nel DB, ne vede sempre solo uno, questa è la query di estrazione per la visualizzazione:
    codice:
     if utente <> 22 and utente <> 53 and utente <> 60 then
            strSQL = "select id_uoat, DueDate, Count(*) as Total, MAX(LastModified) as Latest from message where Month(DueDate)= " _
    	    &Month(dtSelected) &" and Year(DueDate) = " &Year(dtSelected) _
    	    &"  and id_uoat = "&iduoat&" group by DueDate, id_uoat order by DueDate DESC"
    	  else
    	    strSQL = "select DueDate, Chiave, Count(*) as Total, MAX(LastModified) as Latest from message where Month(DueDate)= " _
    	    &Month(dtSelected) &" and Year(DueDate) = " &Year(dtSelected) _
    	    &" group by DueDate, Chiave order by DueDate DESC"
    	  end if
    	    set objREC = objCONN.Execute(strSQL)
    
    Redim aMessages(0)
    	    Redim aMessageDate(0)
    	    Redim aMessageDate2(0)
    	    Redim aMessageStatus(0)
    	    arrIndex = 0 
    	    
    	    Do While NOT objREC.EOF 
    	       aMessages(arrIndex)    = objREC("Total")
    	       aMessageDate(arrIndex) = objREC("DueDate")
    	       aMessageStatus(arrIndex) = objREC("Latest")
    	       
    	       arrIndex = arrIndex + 1 
    	       Redim Preserve aMessages(arrIndex)
    	       Redim Preserve aMessageDate(arrIndex)
    	       Redim Preserve aMessageStatus(arrIndex)
    	      objREC.MoveNext
    	    Loop
    	  
    	     objrec.close
    	     objconn.close
    	     set objrec = nothing
    	     set objconn = nothing 
    
    If CDate(aMessagedate(J)) = CDate(NEWDATE) then 
    	strIMG = "<CENTER><A HREF='pr_messages.asp?id=" &id &"&date=" &datashort(aMessagedate(J)) _
    	&"'>[img]./images/" &aMessages(J) &strDateIMG &".gif[/img]</A>"                
    	exit For
    	else strIMG = ""
    	End if
    	Next

  4. #24
    buon lavoro...

    cmq al posto di questo
    SQLDown = "Delete * from message where DueDate = #"&strDUEDATE&"# and DueDate2 = #"&strDUEDATE2&"# and IdNumeroEvento = "&IdNumeroEvento

    non basta questo
    codice:
    SQLDown = "Delete * from message where IdNumeroEvento = "&IdNumeroEvento
    san imente saluta

    * http://simonecingano.it *

  5. #25
    Utente di HTML.it L'avatar di [trodat]
    Registrato dal
    Oct 2004
    Messaggi
    2,135

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.