<% cId = Request.QueryString("Id") ' creazione dell'oggetto di connessione ADODB Set dbconn = Server.CreateObject("ADODB.Connection") ' indicazione della connessione odbc sul server dbconn.ConnectionString =Application("Aupd_connectionstring") dbconn.Open Application("dbconn_RuntimeUserName"),Application("DbConn_RuntimePassword") SQLQuery= "SELECT Usrs.Id, Usrs.psw, Usrs.Cli, Usrs.Mail, Usrs.Tipo, Usrs.Area, Usrs.Act " & _ "From Usrs " & _ "Where Id='" & cId & "' " & _ "order by Id" Set RS=dbconn.Execute(SQLQuery)
<script LANGUAGE="vbscript"> Sub btnsave_onclick dbconn = CreateObject("ADODB.Connection") dbconn.ConnectionString =Application("Aupd_connectionstring") dbconn.Open Application("dbconn_RuntimeUserName"),Application("DbConn_RuntimePassword") SQLQuery= "Update Usrs Set Cli='" & Trim(CodApp.Value) & "', Psw='" & Trim(Password.Value) & "'," & _ "Mail='" & Trim(Mail.Value) & "' " & _ "Where Id='" & trim(Codice.Value) & "'" msgbox(SQLQuery) dbconn.Execute(SQLQuery) window.Close End Sub </script>The problems are that in this function some vb commands are not correct or are not executed and i can use Application variables from file global.asa. If i exclude all the commands and leave only the window.close command the function is executed so the problem is in the syntax i use.