Page 1 of 1

problem with locking

PostPosted: Mon Jun 02, 2003 1:28 pm
by Harjo
I have the following two methods on the same layout linked to: OnRecordEditStart
databaseManager.acquireLock(foundset, 0)

and OnRecordSave
databaseManager.releaseAllLocks()



This works well, between all clients, but it does'nt work well in combination with Servoy Developer. If I edit a record in Developer and I go thru a client to the same record, i'll get the message: Record is locked. So far so good! If I leave the record in the developer and go back to the client en try to have acces, it still give me the message: record is locked!
As I said: between all clients, it works good!
[/quote]

PostPosted: Tue Jun 03, 2003 12:40 am
by Harjo
Nobody has this problem?

Other question: Is it possible to make from these 2 methods --> global methods?
So I can use them on every layout??

PostPosted: Tue Jun 03, 2003 12:50 am
by Jan Aleman
It has been identified as an issue in Servoy Developer, the good news is that you only need locking in Servoy Client. The client functionality in developer is meant for quick access to your data only. We recommend doing lock testing in client only for the time being.

It is certainly possible to create this in a global method, in fact this kind of things is exactly where global methods were meant for.

PostPosted: Tue Jun 03, 2003 1:04 am
by Harjo
How? I tried several things, but I can't get it work!

PostPosted: Tue Jun 03, 2003 12:14 pm
by Jan Aleman
Code: Select all
databaseManager.acquireLock(forms[currentcontroller.getName()].foundset,0)


Make sure you are careful when you drill down to a foundset inside a global method, it is quite easy to introduce memory leaks in your solution.

PostPosted: Tue Jun 03, 2003 1:07 pm
by Harjo
I'm sorry, but it doesn't work in my solution.
The little blue-lock is'nt visible when i click into a field.

PostPosted: Tue Jun 03, 2003 1:26 pm
by Jan Aleman
That appears to be a 1.01 issue, I can't reproduce it on 1.1

PostPosted: Fri Jun 20, 2003 6:47 pm
by maarten
This works well, between all clients, but it does'nt work well in combination with Servoy Developer. If I edit a record in Developer and I go thru a client to the same record, i'll get the message: Record is locked. So far so good! If I leave the record in the developer and go back to the client en try to have acces, it still give me the message: record is locked!
As I said: between all clients, it works good!


This is fixed in next release (after rc3)