25 pts.
 SQL insert statement
Hopefully there are some ASP experts put there who can help me. I am trying to write an SQL insert statement to populate an access database from an HTML form. When I submit the form, I am getting page cannot be displayed with the following error message:

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/asset/add_to_database.asp, line 32
" method & "', '" & description & "', '" & reason & "', '" & details & "')"

Here is my code. If anyone can tell me what I'm doing wrong it would be appreciated.

sSQL = "INSERT into assets (employee, date, manufacturer, model, department, serial, method, " & _
" description, reason, details) values ('" & employee & "', '" & date & "', '" & _
" manufacturer & "', '" & model & "', '" & department & "', '" & serial & "', '" & _
" method & "', '" & description & "', '" & reason & "', '" & details & "')"
ASKED: Aug 20, 2008  6:08 PM GMT
UPDATED: August 20, 2008  7:44:25 PM GMT
30 pts.

Answer Wiki:
METHOD is a reserved word in SQL. Naming convention suggests that you prefix all of your column names with an identifier. This could be related to the table name, so you could use something like AS_Employee, AS_Date etc
Last Wiki Answer Submitted:  Aug 20, 2008  7:44 PM (GMT)  by  VCinNZ   30 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _