ptslv
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
string strSQLSelect1 = "INSERT INTO [Import] ([timeStamp], DocumentName, DocumentType, TransactionType,TANUM) " +
"VALUES( " + @timeStamp, @DocumentName, @DocumentType, @TransactionType, @TANUM +" )";
ptslv
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ptslv