Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

947 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

21 Experts available now in Live!

Get 1:1 Help Now