Datagridview database not updating

Probably everyone in the world but me knows how Visual Studio handles database files during testing in a GUI-based project. NET projects, I didn't clue into this behavior until recently.

But even if you do know about this "feature," you may not be aware of how you can improve on Visual Studio's default behavior.

And my thanks to my buddy Greg Adams, who explained it to me (he didn't have to draw me pictures, but it was a near thing).

You don't make changes to the database first and then update the grid.

And sure enough, when you go to Server Explorer and browse to the rows that should have been changed in the first run you can see that the data is unchanged.

That's because, when you press F5, Visual Studio quietly copies your database from your project's root folder to the bin/Debug folder, and that's the version of the database that your code updates.

Here's what happens: You add a database to some non-ASP. You run some code that makes some updates and everything seems to work with all of your updates accepted.

You then do a second run…and it's like your previous run never happened!

Search for datagridview database not updating:

datagridview database not updating-47

Finally I was very happy to have Julia Kornich, a technical writer on the EF team, save the day!

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “datagridview database not updating”

  1. Girls only - Come inside and watch live webcam girls from all over the world girlshuntinggirls - Collection of girlshuntinggirls galleries givemepink - Free givemepink galleries hairy gay - Collection of hairy gay galleries Hardcore Fucking Movies - Daily updated - Free hardcore fucking movies and pics herfirstanalsex - Free herfirstanalsex galleries herfirstbigcock - Quality herfirstbigcock galleries herfirstdp - Quality herfirstdp galleries herfirstlesbiansex - Quality herfirstlesbiansex galleries hisfirstgaysex - Collection of hisfirstgaysex galleries hisfirsthugecock - Free hisfirsthugecock galleries Hot blonde - Quality blonde galleries.