Updating datasource with dataset problem -Microsoft Access
-
Tuesday, May 01, 2012 4:52 AM
Hi I'm attempting to update details to an external Microsoft access file, database connection to the file is ok.
I'm getting the following syntax error on line "Dadapt.Update(Dset, "CustomerBook")" :
OleDBException was unhandled
Syntax error in UPDATE statement.
Private Sub btnUpdate_Click(sender As System.Object, e As System.EventArgs) Handles btnUpdate.Click Dim CommandBuild As New OleDb.OleDbCommandBuilder(Dadapt) Dset.Tables("CustomerBook").Rows(count).Item(1) = txtbxName.Text Dset.Tables("CustomerBook").Rows(count).Item(2) = txtSurname.Text Dset.Tables("CustomerBook").Rows(count).Item(3) = txtbxaddress.Text Dset.Tables("CustomerBook").Rows(count).Item(4) = txtbxPost.Text --> Dadapt.Update(Dset, "CustomerBook") MsgBox("Details updated") End SubThis error only occurs when the dataset is changed before updating.
any suggestions would be great!
- Moved by Bob_BaoMVP Thursday, May 03, 2012 4:25 AM (From:Visual Studio Tools for Office)
All Replies
-
Tuesday, May 01, 2012 7:31 AM
Hi Stefan
This question would probably be better in a forum that supports database connections. It has nothing to do with the VSTO technology, so you're more likely to get quick and useful asisstance in a forum that specializes in working with data... Would you like us to move it for you?
Cindy Meister, VSTO/Word MVP
- Edited by Cindy Meister MVPMVP Tuesday, May 01, 2012 7:31 AM added question about moving
-
Friday, May 04, 2012 4:47 AMOwner
Try http://social.msdn.microsoft.com/Forums/en-US/accessdev/threads
Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)
- Proposed As Answer by Ed Price - MSFTMicrosoft Employee, Owner Friday, May 04, 2012 4:47 AM
- Marked As Answer by Ed Price - MSFTMicrosoft Employee, Owner Sunday, May 13, 2012 6:06 AM

