.acceptchanges and updating to a database

G

Guest

I have a some code which imports information from a text file to a dataset.
Depending op what is being extracted from the text file, the dataset has 5
tables which can be written to. During this accessing I have to delete some
records depending on certain criteria. I initially had some errors because I
wasn't accepting the changes made to the dataset. So using .acceptchanges
fixed the issue. however later on in the program a user may choose "update
changes to database" from the menu, this will only update any changes made to
the dataset after the last .acceptchanges command was issued.

Is there a way of updating the contents of the entire dataset to a database
instead of simply the changes made since the .acceptchanges command was
issued?

Cheers
Niels
 
C

Cor Ligthert

Niels,

The problem is that the rowstate of your row should be added to get what I
understand that you want.

http://msdn.microsoft.com/library/d...tml/frlrfsystemdatadatarowstateclasstopic.asp

However AFAIK is the rowstate is readonly, which would mean that you should
in my opinion copy all tables and than really as new added rows.

I know that there are some problems which can be resolved with acceptchanges
while those problems should not exist.

Can you tell what that problem was?

Cor
 
G

Guest

Hmmm,

Sorry about the lack of responce - I found a way to sort out my problem by
seperating the tables being modified into their own Dataset. This stopped
the error being flagged.

Niels
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top