|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Saving data from datagridviewI 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 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 Show quote "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 > > > |
|||||||||||||||||||||||