Click to See Complete Forum and Search --> : Inserting from a typed dataset into an MS Access 2000 database PROBLEM


Royster
November 8th, 2002, 09:29 AM
Hi

I have created a strongly typed dataset in VB.Net. I can sucessfully fill the OLEDBDataAdapter and display the contents of the data adapter.

I can successfully create a new row, and insert it into the dataset. However, when I try to commit the changes to the Access database, I get a blank error exception.

When I use Try and Catch with the update command I get the follwing error message,

"Syntax Error in INSERT INTO Statement".

I created the dataset, by creating a component which housed the dataset within it, using the component designer. The dataset and all the commands were generated from the designer. I actually entered no code.

Is there something I am missing, or is there a bug in the OLEDBDataAdapter in .NET component designer?

Royster
November 8th, 2002, 10:59 AM
As always the answer was something pathetically stupid and ovvious. I have a field in the database called "Value". As you may be aware, "Value" is a reserved word, and all occurances of this word in a SQL statement, needed to have the [] surrounding it. I've now updated it and it works.

:D