Transcation "lost"

5 posts, 0 answers
  1. Michael Winter
    Michael Winter avatar
    7 posts
    Member since:
    Jun 2009

    Posted 09 Sep 2009 Link to this post

    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
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 10 Sep 2009 Link to this post

    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.
  3. DevCraft banner
  4. Michael Winter
    Michael Winter avatar
    7 posts
    Member since:
    Jun 2009

    Posted 10 Sep 2009 Link to this post

    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
  5. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 10 Sep 2009 Link to this post

    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.
  6. Michael Winter
    Michael Winter avatar
    7 posts
    Member since:
    Jun 2009

    Posted 10 Sep 2009 Link to this post

    Hi Jan,
    thanks again, this will help a lot.

    Regards
    Michael
Back to Top
DevCraft banner