SQL insert statement

25 pts.
Tags:
ASP
INSERT statement
SQL
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 & "')"

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following