<% Function recordScore(iScore) //Is a quiz in progress? if (Request.Cookies("QuizID") = "") then Exit Function end if //Get connected to the database Set connection = Server.CreateObject("ADODB.Connection") connection.mode = 3 //ReadWrite Mode sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=c:/inetpub/wwwroot/rocks/_private/Quizzes.mdb" connection.Open(sConnectionString) //Create the command sCommand = "insert into Scores ([QuizID], [Score]) values('" _ & Request.Cookies("QuizID") _ & "', " & iScore & ")" //Issue the command connection.Execute(sCommand) //Check for Errors if (connection.errors.count > 0) then Response.Write("recordAnswer connection error...") end if //Close the connection connection.Close() End Function %>