<% if Request.form("s")="" then response.redirect("index.asp") DIM ColunmNameIntable(2) ColunmNameIntable(0)="Id" ColunmNameIntable(1)="Nme" ColunmNameIntable(2)="HScr" ' When displaying data we will use this values DIM DataName(2) DataName(0)="Id" DataName(1)="Name" DataName(2)="Score" DIM Scores Scores=request.form("s") DataName(0)="Id" DataName(1)="Name" DataName(2)="Score" DIM PathToDatabase ' The location of our database within our server PathToDatabase="C:\Sites\Single1\luthersmyre\database\score.mdb" DIM NameOfTableInDB ' The name of the table in our Access database. In our case this name is "Table1" NameOfTableInDB="high" Set DB = Server.CreateObject("ADODB.Connection") DB.Open ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & PathToDatabase) Set RS = Server.CreateObject("ADODB.Recordset") RS.CursorType = 2 RS.LockType = 3 RS.Open "SELECT * FROM " & NameOfTableInDB, DB rs.addnew rs("HScr") = Request.form("s") rs("CScr") = Request.form("currentscore") if rs("HScr") <= rs("CScr") then RS.MoveLast RS.Delete Response.redirect("sorry.asp") end if RS.Movefirst RS.Delete rs.movefirst rs.delete RS.AddNew RS (ColunmNameIntable(1)) = Request.form("q") RS (ColunmNameIntable(2)) = Request.form("s") RS.Update Set RS = Nothing Set DB = Nothing Response.redirect("high.asp") %>