Using Microsoft Access with Lectora

I added the asp page to my Lectora title. What about the database? Should I add that too?Here is my code again:<%@ Language=VBScript %><%dim adoConn dim rsResult dim strSQL dim sUserID dim sFirstName dim sLastName'Get the parameters posted from the test'sUserID="test123"sFirstName="Bob"sLastName="Jones"'Validate that this is actually from a Lectora test'if UserID="" Or FirstName="" Or LastName="" then Response.Write "" Response.Write "Failure " Response.Write "" Response.Write "STATUS=500" Response.Write "
" Response.Write "Could not parse test results due to a parameter error." Response.Write ""else 'Write the results to an access database' ' First let us create Connection and Recordset objects' Set adoConn = Server.CreateObject("ADODB.Connection") adoConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;" & "DATA SOURCE=" & Server.MapPath("TestResult.mdb") Set rsResult = Server.CreateObject("ADODB.RecordSet") ' Open the connection to the ODBC source, in this case the Access database' adoConn.Open "Result" ' Now, create the SQL statement' strSQL = "INSERT INTO Result(UserID,FirstName,LastName) VALUES ( 'test123', 'Bob', 'Jones')" ' Execute the SQL statement, and set the recordset object' ' to the result of this execution. We obtain the resulting' ' records in Rs object' Set rsResult = adoConn.Execute(strSQL) ' Close the Recordset object and destroy it' Set rsResult = Nothing ' You might want to release the resources for connection object, ' ' unless you want to use the same connection again in the later code' adoConn.Close Set adoConn = Nothing 'The response is optional, it is good for debugging' Response.Write "" Response.Write "Success " Response.Write "" Response.Write "STATUS=200" Response.Write "
" Response.Write(strSQL) Response.Write "
" Response.Write "Success." Response.Write ""end if%>

Discussions have been disabled for this post