I am writing an .asp file to insert data to an Access database using the following JS:
MM_query = "INSERT " +
"INTO Employees (FirstName, Surname, Department, Email, FaxNumber, JobTitle, KnownAs, MobileTelephone, WorkTelephone, MUGSHOT, WorkExtension, UseInPhoneWeb, Staff, Office, MobileSpeedDial, CompanyID1) " +
"VALUES (\"" + textFirstname + "\", \"" + textSurname + "\", \"" + selectDept + "\", \"" + textemailAddress + "\", \"" + textFaxTel + "\", \"" + textJobTitle + "\", \"" + textAKA + "\", \"" + textMobile + "\", \"" + textWorkNo + "\", \"" + selectMugShot + "\", \"" + textExtn + "\", 1, 1, \"" + selectOffice + "\", " + textMobSpDial + ", " + selectCompany + ")";
var conn = Server.CreateObject("ADODB.Connection");
conn.Open(MM_PhoneWeb_conn_STRING);
var rs = Server.CreateObject("ADODB.Recordset");
rs.Open(MM_query, conn);
conn.Close();
Upon execution I get the following error:
An error occurred on the server when processing the URL. Please contact the system administrator.
The query works when pasted directly to access and similar code works for retrieving data from the DB.
Can anyone suggest how best to troubleshoot?