Syntax Error in INSERT INTO Statement

I am trying to insert data into an Access database using C# in a Windows App.  I keep getting a syntax error on this  sql statement telling me a ';' is expected at the end of the statement.  I put extra ; in and get the same error.  All other surrounding code has the proper ';'.  

string strSQLSelect1 = "INSERT INTO [Import] ([timeStamp], DocumentName, DocumentType, TransactionType,TANUM)  " +
      "VALUES( " + @timeStamp, @DocumentName, @DocumentType, @TransactionType, @TANUM +" )";

ptslv
ptslvAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SRigneyCommented:
Access Queries themselves expect to end in a semicolon, and you need to fill in the values for you query.

Try this:

string strSQLSelect1 =
  String.Format("INSERT INTO [Import] ([timeStamp], DocumentName, DocumentType, TransactionType,TANUM) VALUES( {0}, {1}, {2}, {3}, {4}, {5});", timeStamp, DocumentName, DocumentType, TransactionType, TANUM );

Make sure that you are using the correct variables that hold to values for
timeStamp, DocumentName, DocumentType, TransactionType, TANUM
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ptslvAuthor Commented:
Thanks, SRigney.  But I already trashed this version because it worked without the Insert Into query.  I was having other problems that prompted me to go this route.  However, since you responded before I cancelled the question, I will give you the points.  If you want more, just see my next question!  ;-)

ptslv
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.