Schedule binded: handle concurrency violation

Posted by: fsegui on 23 August 2022, 9:31 am EST

  • Posted 23 August 2022, 9:31 am EST - Updated 3 October 2022, 10:15 pm EST

    Hi,

    I’m using C1Schedule binded to a database.

    The application can be used by several users at the same time. Thus, they’re are inserting new appointments/updating existing appointments in the same database and sometimes it could lead to concurrency violation.

    I have to handle the different cases when it could happens but I’m wondering how I can handle the case when two users insert appointments at the same time?

    To precise how my application is working:

    • the C1Schedule is binded with indexMapping (to a column that is a primary key in my database)

    • it updates the database just after appointment has been added/changed by retrieving the id from the appointment
    Dim row As DataRow = Me.Calendar.calendarevents.Rows.Find(app.Key(0))
    

    Do you have any advices on how to handle this?

    Thanks

    Best regards

    Florent

  • Posted 24 August 2022, 3:27 am EST

    Hi Florent,

    Your requirements seem similar to the requirements in this forum post : https://www.grapecity.com/forums/winforms-edition/updating-appointment-after.

    Please refer to the solution suggested, if you face any issues, let us know.

    Regards

    Avnish

  • Posted 24 August 2022, 3:36 am EST

    Hi Avnish,

    Yes, it answers when 2 users updates the same appointment even though I’m not sure how to code it. I’m not familiar with service layer. Do you have any sample?

    But how to handle when users insert a new appointment at the same time?

    It happens some times and in this case, one of the two appointments was not inserted into the database and the user had to restart the application.

    Regards

    Florent

  • Posted 25 August 2022, 1:18 am EST

    Hi Florent,

    We have created a support ticket (CAS-33825-W3D8N4) for this issue. Please continue the thread there.

    Regards

    Avnish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels