PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Saving data from datagridview
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Saving data from datagridview
![]() |
Saving data from datagridview |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have a access database with one table, which two columns. The columns are
name which is text, and present which is a boolean. I create a new windows application, and include the table using wizard. I then drop the table onto my main form. VB creates a tableadapter, bindingsource, datagridview, and a bindingnavagrator. I can see my data from the table in the grid, so the tableadapter.fill works. VB also added the code for the navagator save button. If I change the data in the grid, or use the navagator add button the records do not get saved. When I exit and re-enter the application the changes are missing. The book I am learning with implies I do not have to add code. Am I missing something? Thanks |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Bob,
Changes do not go automatically to the database until code will call Update method of the DataAdapter. This is disconnected environment and you need to do it explicitly -- Val Mazur Microsoft MVP http://xport.mvps.org "Bob Simoneau" wrote: > I have a access database with one table, which two columns. The columns are > name which is text, and present which is a boolean. I create a new windows > application, and include the table using wizard. I then drop the table onto > my main form. VB creates a tableadapter, bindingsource, datagridview, and a > bindingnavagrator. I can see my data from the table in the grid, so the > tableadapter.fill works. VB also added the code for the navagator save > button. If I change the data in the grid, or use the navagator add button > the records do not get saved. When I exit and re-enter the application the > changes are missing. The book I am learning with implies I do not have to > add code. Am I missing something? > > Thanks > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

