Locking in multi-user application

Locking in multi-user application

Postby jeen » Fri 19 Aug 2016 19:20

I am using .NET Framework 4.6.1, WinForms, PostgreSql 6.4beta4 and Npgsql and ADO.NET.

My current application is a multi-user-application where all users connect to the same database.

Data gets binded to the controls by using DataTable, BindingSource and BindingNavigator.

I want to avoid that two users can edit a DataRow at the same time. Because i want to implement this on a more general approch i was thinking about creating a DataTable descendant and add the property LockMode (None, Row, Table).

I found out that you can use the ColumnChanged event in combination with RowState to detect changes on the data.

I now know whether the user is inserting a new value, editing (RowState = modified) a existing one or is just looks (RowState = Unchanged) at the record.

Therefore i am looking for a solution to lock the DataRow once a user starts editing it. In the application i want to display a message once a user navigates (by using the Bindingnavigator or programmatically) to a locked record.

I saw that your solutions for Delphi offer some kind of Locking feature. I am wondering if my described screnario can be realized with your components?
Posts: 2
Joined: Fri 19 Aug 2016 19:17

Re: Locking in multi-user application

Postby Pinturiccio » Tue 23 Aug 2016 09:50

Unfortunately, dotConnect for PostgreSQL does not have properties or methods in PgSqlDataTable or DataLink classes which provide a ready solution for the issue.
Devart Team
Posts: 1981
Joined: Wed 02 Nov 2011 09:44

Return to dotConnect for PostgreSQL