PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Saving data from datagridview

Reply

Saving data from datagridview

 
Thread Tools Rate Thread
Old 07-02-2006, 09:47 PM   #1
Bob Simoneau
Guest
 
Posts: n/a
Default Saving data from datagridview


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


  Reply With Quote
Old 08-02-2006, 03:13 AM   #2
=?Utf-8?B?VmFsIE1henVyIChNVlAp?=
Guest
 
Posts: n/a
Default RE: Saving data from datagridview

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
>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off