in

CodeSmith Community

Your Code. Your Way. Faster!

Transaction Timeout

Last post 04-19-2007 9:47 AM by basolutions. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-13-2007 1:30 PM

    • basolutions
    • Top 100 Contributor
    • Joined on 03-21-2007
    • Denver, CO
    • Posts 51
    • Points 1,175

    Transaction Timeout

    All,

    I have a web form with a FormView control where I am updating some basic contact data as well as some roles.  Due to the complexity of the roles, I am saving those manually.  On the ItemCommand event, I check to see if the command is 'Update' and if so, I manually process a few statements like Roles.AddUserRole.  This works.  The contact record gets updated via the netTiers DataSource controls and the roles get updated via the manual process.

    But...

    When I go to reload the form after the update, I get a timeout when I am trying to load role related data.  Is there something I need to do to complete the transaction when doing both databound and manual operations?

    Thanks,

    Jesse

     

    Filed under: ,
    • Post Points: 50
  • 04-16-2007 4:10 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 921
    • Points 34,675

    Re: Transaction Timeout

    Check that your manual updates are taking part in any transaction you are using on the form. 

    hth

    swin 

    -------------------------------------------------
    Member of the .NetTiers team
    -------------------------------------------------
    • Post Points: 35
  • 04-16-2007 5:16 PM In reply to

    • basolutions
    • Top 100 Contributor
    • Joined on 03-21-2007
    • Denver, CO
    • Posts 51
    • Points 1,175

    Re: Transaction Timeout

    swin,

    Can you give me an idea of how I can validate that my manual updates are being handled in the transaction?  I'm not sure of how to check this.  I'm pretty sure that it's not.  Do I have to create a transaction first?  A code sample would be great.

     Thanks,

    Jesse

    • Post Points: 35
  • 04-17-2007 2:00 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 921
    • Points 34,675

    Re: Transaction Timeout

    How is your datasource thats linked to your FormView configured? Do you have transactions enabled? (it's an option on the datasource)

    Are you using a component layer?  

    How are you doing the manual updates? Directly using the DataRepository or through any component layer?

    When I was developing a complex page I ran into a similar problem and it was just a case of debugging the app and finding out which db command was causing the problem and in my case just configuring it so that it used the transaction manager created by the datasource.

    hth

    swin 

    -------------------------------------------------
    Member of the .NetTiers team
    -------------------------------------------------
    • Post Points: 35
  • 04-19-2007 9:47 AM In reply to

    • basolutions
    • Top 100 Contributor
    • Joined on 03-21-2007
    • Denver, CO
    • Posts 51
    • Points 1,175

    Re: Transaction Timeout

    My datasource on my formview does NOT have transactions enabled.  I have a service layer for my component layer, which I assume my datasource control is using to do the save. 

    I am performing the manual save using the System.Web.Security.Roles class to update the user's role.  This save is called on the formview's ItemCommand event, which I am guessing might be the problem.  I don't get an error during the save, but rather when I try to display the data in read only mode immediately after the save occurs. 

     Can I include my multiple calls to the Roles class in the same transaction?  How do I get a reference to that transaction?

    Thanks,

    Jesse

    • Post Points: 5
Page 1 of 1 (5 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems