?
Solved

VB.Net  Saving Data in Datagridview to Access Database

Posted on 2011-09-22
5
Medium Priority
?
620 Views
Last Modified: 2012-05-12
Hi Experts.  I Have a DGV, a navigator and a bindingsource to an Access database.  The data shows correctly in the DGV and the navigator handles everything in the DGV correctly, such as adding and deleting rows, etc but I see no way of saving the edited DGV back to the Access databse.  Please can someone advise how this is done.  MAny Thanks in advance.
0
Comment
Question by:PNRT
[X]
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
5 Comments
 
LVL 17

Expert Comment

by:nepaluz
ID: 36581164
show some code on how you are loading the data into your DataGridView. Also, have you a preference on how to save it back to Access? (e.g sql, LINQ etc ..)
0
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 36581296
It should automatically.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36582126
What are you feeding into the bindingsource? DataTable? Are you using a TableAdapter? You need to call the Update method on it.
0
 
LVL 2

Author Comment

by:PNRT
ID: 36583123
Hi, Im not using any code at all.    I created a dataset connected to an Access database.   I chose that dataset in the properties of the Datagridview and the bindingsource and the table adapter were created automatically.  I then connected the bindingnavigator to the binding source.   It all works correctly.  The data in the database appears in the datagridview and the navigator navigates the datagridview.   But new  entries in the datagridview are not being saved back to the database.  I thought sl8rz had it right that there would be an option for it to save back automatically?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 36593822
There isn't. You need to call the Update method on the TableAdapter.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

771 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