Link to home
Start Free TrialLog in
Avatar of ptslv
ptslvFlag for United States of America

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of SRigney
SRigney
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ptslv

ASKER

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