Buon giorno a tutti...
Premetto che sto alle prime armi e che ho molta confusione in testa....![]()
Ho un problema:
Devo usare l'evento "onUnload" sul body per intercettare la chiusura del BR, lanciare una Sub
" update_chiusura() " che conterrà una stringa SQL per resettare un campo....
Ho dei problemi per richiamare la SUB ...
questo è il mio codice:
%>
Sub update_chiusura()
Dim qry
qry = " UPDATE utenti" &_
" SET utenti.connesso = 0, utenti.data_connessione = '' " &_
" WHERE utenti.username = '" & username & "' " &_
" AND utenti.password = '" & password & "' "
If oConnection.State <> 1 Then
oConnection.Open()
End If
If oConnection.State <> 1 Then
Response.Write "Impossibile effettuare l'accesso.Impossibile...."
Exit Sub
End If
oCommand.CommandText = qry
oCommand.ActiveConnection = oConnection
oCommand.Execute
End Sub
%>
<head>
<title>CHAT...TIAMO</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
</head>
<body onUnload="update_chiusura()"-->
help.....
![]()
![]()

Rispondi quotando
