debugging asp/javascript
I can't figure out why there is an internal error for this code below, i don't see the problem, do you?
<%@ LANGUAGE = JavaScript%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
// Array to hold names of months
// used for creating date in format day month year
var month = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul",
"Aug","Sep","Oct","Nov","Dec");
var nowDate = new Date();
var nowDate = nowDate.getDate() + " " + month[nowDate.getMonth()] + " " +
nowDate.getFullYear();
var orderNo;
// Connect to database
var adoConnection = Server.CreateObject("ADODB.Connection");
adoConnection.Open("DSN=conhcn");
var adoRecordset;
// Create SQL to insert new order into CustomerOrder table
var mySQL = "INSERT INTO clientprojects " +
"(email, description, datePosted )";
mySQL = mySQL + " VALUES ('" + Request.Form("email") + "','";
mySQL = mySQL + Request.Form("description") + "','";
mySQL = mySQL + nowDate + "')";
// Execute SQL to add new order
adoConnection.Execute(mySQL);
// Recordset not needed after this so close it and allow release of memory
adoRecordset.Close();
adoRecordset = null;
// No more database access
// so close connection and indicate memory no longer needed
adoConnection.Close();
adoConnection = null;
Response.Write("<H2><CENTER>Your order was completed successfully" +
"</CENTER></H2>");
%>
</BODY>
</HTML>
|