%@ Language=VBScript %> <% Response.Expires = 0 Dim cookieusu, usu, clogin, cpwd,codusu usu="" clogin="" cpwd="" codusu="" cookieusu=Request.Form("cookieusu") if cookieusu="undefined" then cookieusu="" usu=Request("usu") if usu<>"" and cookieusu<>"" then Set objConnection=Server.CreateObject("ADODB.Connection") objConnection.Open "naycom" Set objCommand = Server.CreateObject("ADODB.Command") Set rsusu = Server.CreateObject("ADODB.Recordset") fraseSQL = "SELECT * FROM USUARIOS WHERE(ID_USU=" & cookieusu & ");" objCommand.CommandText = fraseSQL objCommand.CommandType = adCmdText Set objCommand.ActiveConnection = objConnection rsusu.Open objCommand, ,adOpenKeyset,adLockOptimistic if not rsusu.EOF then codusu=rsusu("ID_USU") clogin=rsusu("LOGIN") cpwd=rsusu("PWD") end if rsusu.Close Set rsusu=Nothing objConnection.Close Set objConnection=Nothing end if %>