Saving a Database to Disk

  • Thread starter Thread starter Jager
  • Start date Start date
J

Jager

Ok, I've got a program I am working on that is supposed to save all
changes to the dataset to the actual database, but this doesn't seem to
be working. I used the DataAdapter.Update(DataSet) method, but that
doesn't save the changes to my actual database.

How can I go about updating the actual database to save changes?
Please help,
Jager
 
Jager,

A dataadapter update does only save datarows from which the rowstate is not
"not changed".

However how a rowstate is set, depends very much how your program is build,
so therefore you have to tell more.

Cor
 
Well I can use the commands to add information to my database and it
saves the changes to the database itself, but when I delete rows by
using RemoveAt for the CurrentSelectedRow , the database won't save the
changes. I have also tried the delete method and I don't beleve that
worked. What I need it to do is save the changes to the database in
anyway possible without manually saving the changes ( I can't expect
the person using this to save on his own.) If I can get this all to
work, I'll be in good shape, I think.
 
Jager,

You need to use Delete if you are trying to mark the row for deletion from
the database.

Kerry Moorman
 
Jager,

In addition to Kerry,

RemoveAt or all other Removes in this situations, remove a datarow complete
from a datatable with all its aspects.

A delete, set the row to be removed after and update or with an
acceptchanges.

(This alone for those row for which this is important. newly added rows will
be with delete as well direct removed from a datatable)

I hope this helps,

Cor
 
Back
Top