% 'Dimension variables' Dim adoCon 'Holds the Database Connection Object' Dim rsEmpInfo 'Holds the recordset for the records in the database' Dim strSQL 'Holds the SQL query to query the database ' 'Create an ADO connection object' Set adoCon = Server.CreateObject("ADODB.Connection") 'Set an active connection to the Connection object using a DSN-less connection' adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Users.mdb") 'Create an ADO recordset object' Set rsEmpInfo = Server.CreateObject("ADODB.Recordset") 'Initialise the strSQL variable with an SQL statement to query the database' strSQL = "SELECT Users.Id, Users.Password FROM Users;" strSql2 = "select * from Users where Id = '" & trim(request.form("user")) & "' and Password = '" & trim(request.form("pass")) & "'" if request.form("login") <> 1 then %>
