Submit orm to DB w/ ASP (debug)?
August 15, 2008 12:00 AM
Hello,Below is the code I have pieced together for an ASP page, linked to a Lectora-based form (screen shot of request form attached). The page should forward data over to the Access 2003 database referenced in the code No data is going into the database and there is a blank pop up error screen (with java script in the title bar) when I try to submit form data. I suspect the error lies in the ‘connection string’ but or maybe in the database? All I did to set up the database was to create a table called "Results w/ columns named after each variable in the ASP script. Maybe I'm missing something there.I appreciate any advice you might have on this. ____________________________________________________________ _________________________________________________________ <%@ Language=VBScript %><%dim adoConndim rsTestdim strSQLdim sProctorIDdim sProctorPWdim sExamDatedim sLMSCourseCodedim sStudentIDsProctorID=Request.form("ProctorID")'sProctorPW=Request.form("ProctorPW")'sExamDate=Request.form("ExamDate")sLMSCourseCode=Request.form("LMSCourseCode")sStudentID=Request.form("StudentID") Set adoConn = Server.CreateObject("ADODB.Connection")adoConn.Open "DBQ=" & Server.Mappath("C:Documents and Settingsu52p50My DocumentsGEICODev FilesLECTORANEWProctorFunctionRequest FormhtmlProtcorDB.mdb") undefined" strSQL = "INSERT INTO Results(ProctorID,ProctorPW,ExamDate,LMSCourseCode,StudentID ) VALUES ( '" & sProctorID & "', '" & sProctorPW & "', '" & sExamDate & "', '" & sLMSCourseCode & "', '" sStudentID & "')" Set rsTest = Conn.Execute(strSQL) Set rsTest = Nothing adoConn.Close Set adoConn = Nothing%>
Discussions have been disabled for this post