|
-
November 8th, 2002, 10:29 AM
#1
Inserting from a typed dataset into an MS Access 2000 database PROBLEM
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?
-
November 8th, 2002, 11:59 AM
#2
I've sorted out the problem
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|