locked
ASP.NET Update to database if any Batch running RRS feed

  • Question

  • Hi,

    I have an ASP.NET Web application. Can anyone give best solution for the following scenario:

    User1 has logged-in to application and trying to update from UI. At the sametime User2 (who is the admin) has also logged-in to the application and wanted to perform the roll-out operation.

    In this situation I should take care that

    When anyone else is trying to update a message should be thrown that "Cannot proceed, b'cos RollOver started"

    What is the best way to achieve this? can we have this check from UI or else in Database side.

    Please suggest.

    Padma

    Wednesday, October 31, 2012 5:22 PM

All replies

  • One solution is to create a table in the db which indicates that your rollover process is running. When your process starts, set a flag in the table to true. When the process ends, set the flag to false. Then from the UI, check the state of the flag in the table before allowing the user to perform his update. If the flag is true, show the appropriate message.

    Paul Delcogliano

    Wednesday, November 7, 2012 1:46 PM