Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 25

Discussione: update query...

  1. #1

    update query...

    se nella stessa pagina asp faccio due UPDATE ma entrambe le query sono chiamate strSQL possono vericarsi problemi sulla pagina?

    strSQL = "UPDATE utenti SET ultimoaccesso = now() WHERE name = '" & str_name & "'"
    adoCon.execute strSQL

    strSQL = "UPDATE utenti SET test = now() WHERE name = '" & str_name & "'"
    adoCon.execute strSQL
    grazie ancora

  2. #2

  3. #3
    immaginavo...

    stò facendo queste domande solo perchè ho ancora questo problema
    illustrato qui: http://forum.html.it/forum/showthrea...readid=1229062

    ma purtroppo rimarrà un mistero!

  4. #4
    Originariamente inviato da master87tm
    immaginavo...

    stò facendo queste domande solo perchè ho ancora questo problema
    illustrato qui: http://forum.html.it/forum/showthrea...readid=1229062

    ma purtroppo rimarrà un mistero!
    Se il db è access, prova così:

    codice:
    strSQL = "UPDATE utenti SET ultimoaccesso = #" & now() & "# WHERE name = '" & str_name & "'"
    adoCon.execute strSQL 
    
    strSQL = "UPDATE utenti SET test = #" & now() & "# WHERE name = '" & str_name & "'"
    adoCon.execute strSQL
    Se è mysql:

    codice:
    strSQL = "UPDATE utenti SET ultimoaccesso = '" & now() & "' WHERE name = '" & str_name & "'"
    adoCon.execute strSQL 
    
    strSQL = "UPDATE utenti SET test = '" & now() & "' WHERE name = '" & str_name & "'"
    adoCon.execute strSQL

  5. #5
    Originariamente inviato da Vitacillina
    Se il db è access, prova così:

    codice:
    strSQL = "UPDATE utenti SET ultimoaccesso = #" & now() & "# WHERE name = '" & str_name & "'"
    adoCon.execute strSQL 
    
    strSQL = "UPDATE utenti SET test = #" & now() & "# WHERE name = '" & str_name & "'"
    adoCon.execute strSQL
    Se è mysql:

    codice:
    strSQL = "UPDATE utenti SET ultimoaccesso = '" & now() & "' WHERE name = '" & str_name & "'"
    adoCon.execute strSQL 
    
    strSQL = "UPDATE utenti SET test = '" & now() & "' WHERE name = '" & str_name & "'"
    adoCon.execute strSQL
    ho mysql, provo ad effettuare questa modifica e ti farò sapere..grazie

  6. #6
    strSQL = "UPDATE utenti SET ultimoaccesso = '" & now() & "' WHERE name = '" & str_name & "'"
    adoCon.execute strSQL

    strSQL = "UPDATE utenti SET test = '" & now() & "' WHERE name = '" & str_name & "'"
    adoCon.execute strSQL
    facendo così ho appena mandato in tilt 87 utenti online...perchè il campo ultimoaccesso e test non si sono aggiornati ma ha generato errore

  7. #7
    non ho capito... stampa la query prima di eseguirla...

  8. #8
    si un secondo che ho fatto un danno enorme..

  9. #9
    Originariamente inviato da Vitacillina
    non ho capito... stampa la query prima di eseguirla...
    per la stanchezza l'avevo eseguita subito..
    per fortuna il danno è capitato solo a 12 utenti perchè ho ricorretto subito..

    facendo come m hai consigliato viene generato errore

  10. #10
    Originariamente inviato da master87tm
    per la stanchezza l'avevo eseguita subito..
    per fortuna il danno è capitato solo a 12 utenti perchè ho ricorretto subito..

    facendo come m hai consigliato viene generato errore
    Che sarà mai...

    Fai così e controlla che la variabile str_name sia valida all'interno della query :

    codice:
    strSQL = "UPDATE utenti SET test = '" & now() & "' WHERE name = '" & str_name & "'"
    
    response.write strSQL : response.end
    
    adoCon.execute strSQL

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