This is a migrated thread and some comments may be shown as answers.

Transcation "lost"

4 Answers 43 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Winter
Top achievements
Rank 1
Michael Winter asked on 09 Sep 2009, 09:04 AM
Hi,
I use an ObjectProvider and an ObjectView bound to some datacontrols.

When I use ObjectProvider.SaveAll to save my data and get an exception (for example unique key constraint violated). After I correct the data and I trying to save the data again, I get an exception mentioning that there is no active transaction. Why is the transaction ended automatically at the first exception? Can I start the transaction again or keep it alive?

How do I use the objectscope with objectprovider and objectview?

Thanks
Michael

4 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 10 Sep 2009, 12:28 PM
Hi Michael Winter,
This is a bug in the ObjectProvider. I have fixed it and the fix will be available in the next custom build or service pack.

Sincerely yours,
Jan Blessenohl
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michael Winter
Top achievements
Rank 1
answered on 10 Sep 2009, 12:39 PM
Hi,
thanks.

Could you remind me, when the new servicepack of the express edition is available.

Is it a workaround to modify the transactionstate in the objectscope after the exception?

Thanks
Michael
0
Jan Blessenohl
Telerik team
answered on 10 Sep 2009, 01:00 PM
Hi Michael Winter,
I will inform you about the next available build.

Yes, the workaround is valid. Just say
if (objectProvider1.Context.Transaction.Level == 0)
    objectProvider1.Context.Transaction.Begin();

Kind regards,
Jan Blessenohl
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michael Winter
Top achievements
Rank 1
answered on 10 Sep 2009, 01:03 PM
Hi Jan,
thanks again, this will help a lot.

Regards
Michael
Tags
Development (API, general questions)
Asked by
Michael Winter
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Michael Winter
Top achievements
Rank 1
Share this question
or