Hello everyone!
I have a small app which inserts records into ms access from c# 2.0.I build an ad hoc insert query based on the user input & use a command object to execute the same.The query has 40 columns.
The insert query works perfectly when executed in access DB.But the executeNonQuery method gives an error like "Syntax Error in Insert Into statement".I am stuck with this thing & new to access.Any help would be of great help.
Thanks
Error Executing an Insert Statement
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jan MontanoRank #1,295 · 1.3K reputationPosted Jul 18, 2007, 5:11 PM EDT
Could you kindly post the insert query you have from your c# code. Or rather the partial code involving the insert to database, from connection to the command object execution. Thanks
Regards,
Jan
Rakrus106 reputationPosted Jul 18, 2007, 10:09 PM EDT
you have to check wether the datatypes are matched or not for u r query.
Thanks
[email protected]