Re: Update and Inserting Dataset
From: Carlos Hernandez (carlos_at_integrasofthn.com)
Date: 09/02/04
- Next message: bill yeager: "DB2 managed provider problems during a FILL"
- Previous message: G: "Is it possible to pass a DataSet TableName as a parameter?"
- In reply to: Val Mazur: "Re: Update and Inserting Dataset"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Sep 2004 08:33:18 -0600
The transaction is not a problema, all this process occurs within a
transaction. My process does a rollback if anything goes wrong, the problem
is not this, the problem is that the datasets thinks he made the changes,
and the state is unchanged, not added. So when I try again to save the data,
I get a concurrency violation because my datasets returns 0 records updates.
Thanks.
"Val Mazur" <group51a@hotmail.com> wrote in message
news:uhdtOMJkEHA.3392@TK2MSFTNGP15.phx.gbl...
> Hi Carlos,
>
> What about updating in a transaction? In this case if something failed,
> then you could rollback all the changes in a database
>
> --
> Val Mazur
> Microsoft MVP
>
>
> "Carlos Hernandez" <carlos@integrasofthn.com> wrote in message
> news:uH5lz8DkEHA.2140@TK2MSFTNGP15.phx.gbl...
>>I am using datasets and the command builder to update my database. It
>>works fine, but if there is an exception of any kind after and update of
>>one of my datasets, then the dataset state is leaved in unchanged, and the
>>next time I save I get an DBConcurrencyValidationException. What I do in
>>the insert method of my class, is to detach this row, and attched it
>>again. But in the update method what can I do?, If I remove and add the
>>row, the stated will be added, and this will try to insert the data
>>instead of updating..
>>
>>
>> Thanks in advance for your help.
>>
>
>
- Next message: bill yeager: "DB2 managed provider problems during a FILL"
- Previous message: G: "Is it possible to pass a DataSet TableName as a parameter?"
- In reply to: Val Mazur: "Re: Update and Inserting Dataset"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|