<%
strConnect = "CONNESSIONE DB"
Set objConn = Server.CreateObject ("ADODB.Connection")
Set objRec = Server.CreateObject ("ADODB.Recordset")
objConn.Open strConnect
SQL = "SELECT * from DB_USER WHERE id_user = '"&Session("ID_UTENTE")&"' "
Set RSb = objConn.Execute (SQL)
If RSb.EOF And RSb.BOF Then
' DATI NON SONO PRESENTI, AGGIUNGO UN NUOVO RECORD
objRec.Open "DB_USER", strConnect, 0, 2, 2
objRec.AddNew
objRec("id_user") = Session("ID_UTENTE")
objRec("Data_Accesso") = Date()
objRec("IP_LOG") = Request.ServerVariables("REMOTE_ADDR")
objRec.Update
objConn.Close
Else
' I DATI SONO PRESENTI, AGGIORNO EVENTUALI MODIFICHE
id_user = (Request.Form("id_user"))
SQL_CL = "UPDATE DB_USER SET Data_Accesso = '"&Date()&"' WHERE id_user = '"&Session("ID_UTENTE")&"'"
objConn.Execute (SQL_CL)
objConn.Close
Set Objrec = Nothing
Set ObjConn = Nothing
End If
Set Objrec = Nothing
Set ObjConn = Nothing
%>