cwolgamott
Programmer
Hello.
I am building an asp page where I am trying to insert values into a database table. I believe that I may be having difficulty inserting NOW() into a field. I was wondering if that is how I should be inserting the current date and time into a field. Secondly, I am getting the following error:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'VALUES'.
That error message is coming from the following code:
SQL = " INSERT INTO CaseInfo (CaseInfo.casenum, CaseInfo.caller, CaseInfo.subject, CaseInfo.description, CaseInfo.openedby, CaseInfo.dateopened, CaseInfo.daterequested, CaseInfo.dateneeded, CaseInfo.dateestimated, CaseInfo.iscompleted, CaseInfo.respondedto, CaseInfo.percentcomplete, CaseInfo.status "
SQL = SQL + "VALUES (" + CStr(newCaseNumber) + ", " + "'" + inputFullName + "', " + "'" + Request("subject"
+ "', " + "'" + Request("description"
+ "', " + "'" + "INTRANET" + "', " + "NOW()" + ", " + "'" + CStr(Request("date1"
) + "', " + "'" + CStr(Request("date1"
) + "', " + "NOW()" + ", " + "'" + "N" + "', " + "'" + "N" + "', " + "0" + ", " + "'" + "NOT STARTED" + "')"
conn1.Execute(SQL)
I would greatly appreciate any suggestions.
Thank you. 
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'VALUES'.
That error message is coming from the following code:
SQL = " INSERT INTO CaseInfo (CaseInfo.casenum, CaseInfo.caller, CaseInfo.subject, CaseInfo.description, CaseInfo.openedby, CaseInfo.dateopened, CaseInfo.daterequested, CaseInfo.dateneeded, CaseInfo.dateestimated, CaseInfo.iscompleted, CaseInfo.respondedto, CaseInfo.percentcomplete, CaseInfo.status "
SQL = SQL + "VALUES (" + CStr(newCaseNumber) + ", " + "'" + inputFullName + "', " + "'" + Request("subject"
conn1.Execute(SQL)
I would greatly appreciate any suggestions.