Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2008-10-23
1
386 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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