Unable to add records, syntax error in insert into statement

I'm using the below code to update values from the web page to the access database.
And I'm getting the error of "Syntax error in INSERT INTO statement".
When I directly run the insert statement (which I get from this code) in the access database, the record gets added without any error.

There is one more column of ID which is an autonumber field so I'm not taking it here.

The autonumber field ID was giving problem.
When I included it in the insert statement, the same code ran without any problems.
so currently I'm fetching the max(ID) before the insert command to make things work.

It's weird but this thing got working after 2-3 months of wait.
Finally after giving up I posted my problem here.