473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Saving a Database to Disk

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

Feb 3 '06 #1
4 1027
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
Feb 3 '06 #2
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.

Feb 3 '06 #3
Jager,

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

Kerry Moorman
"Jager" wrote:
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.

Feb 3 '06 #4
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
Feb 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

138
by: theodp | last post by:
--> From http://www.techdirt.com/articles/20040406/1349225.shtml Microsoft Patents Saving The Name Of A Game Contributed by Mike on Tuesday, April 6th, 2004 @ 01:49PM from the...
1
by: Jose Egea | last post by:
Hello: I would like to make an application to manage word and pdf documents, opening and saving them in a sql database. Is there any way to open a document sending to the winword application a...
3
by: Mark | last post by:
Hi, I have put together a script in C# that takes a text file, then streams it into a SQLServer database. What I am trying to do now is create another script that does the exact opposite: selects...
2
by: Mark Denardo | last post by:
Hi, I need some expert GDI+ person to help me with my RoundOffImage Function: What I'm trying to do is take in an image, crop off the edges around an ellipse region I set up, and then return the...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
6
by: Mark Denardo | last post by:
My question is similar to one someone posted a few months back, but I don't see any replies. Basically I want to be able to have users upload photos and save them in a database (as byte data)...
7
by: ConfusedAlot | last post by:
This is my code for a database, whenever i save the database to the file 'database.txt' and display the results i get this; name - (correct, is what i put in) pin - 3435973836 slew rate -...
6
by: Karl | last post by:
Hi all, It may seem like a rather odd request (or not) but I would like to be able to create a file (doc, jpg, xls or one of many other files that can be automated) on a website and stream it to...
8
by: siva211662 | last post by:
I want to save windows form and controls (text box,button,user control.. ) along with there properties to hard disk or Database at run time.I tried using with serialization but i am facing some...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.