Solved

Why is datagridview not committing changes to the database in vb.net?

Posted on 2008-10-23
1
376 Views
Last Modified: 2013-11-26
Using Visual studio 2005 Vb.net I  automatically generated a bound datagridview
It used a data adapter to fill the data table. It also set the DataSource of a binding source to the data table and then bound the binding source to a datagridview. After you update in the datagridview, it
use the data adapter to save the changes to the database. The problem is although i see the changes in the application it never appears in the databse. The save is the following:
Me.validate()
Me.WorkspaceBindingSource.EndEdit()
Me.WorkspacetableAdaptor.Update(Me.driverdataset.Workspace)

No errors are raised on the save.  Thanks in advance for your time!!
0
Comment
Question by:mrgonon
1 Comment
 

Accepted Solution

by:
mrgonon earned 0 total points
ID: 22791859
The problem had to due with the copy to output directory setting. The DBwas getting updated, however, when I started the application it would always overwrite the DbB because it was set to copy always. Thus it apppeared things were not working. I cahnged it to copy if newere and problem solved.
I cant beleive that stumped me for 5 hours. :(
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now