CommandBuilder Problem
-
Is it possible to insert rows in to a MS Access table with a Auto number field using a CommandBuilder. I tried that but it's getting following error. Syntax error in Insert in to statement. I did same thing to a table which doesn't have a auto number field. It worked. I think the problem is that auto number field. What's the solution for this problem.
-
Is it possible to insert rows in to a MS Access table with a Auto number field using a CommandBuilder. I tried that but it's getting following error. Syntax error in Insert in to statement. I did same thing to a table which doesn't have a auto number field. It worked. I think the problem is that auto number field. What's the solution for this problem.
I believe the problem may be that you are trying to pass a value for the auto number field. That would cause the insert to fail. In your Insert statement, list the fields you want to include, but don't list the Autonumber field, then in your value clause list only the values which need to be inserted. remeber to vote :cool:
-
I believe the problem may be that you are trying to pass a value for the auto number field. That would cause the insert to fail. In your Insert statement, list the fields you want to include, but don't list the Autonumber field, then in your value clause list only the values which need to be inserted. remeber to vote :cool:
-
I didn't use any Insert statement. Just used CommandBuilder class to generate SQL statements
Check this article out ... I think you should be using a different method to manipulate the Access data. I have been using the System.Data.OleDb classes for MS-Access and they work fine. http://msdn.microsoft.com/en-us/library/ms971491.aspx[^] Remeber to vote.