Re: Record locking woes

2021-01-11 Thread Keith Goebel via 4D_Tech
Sorry - nothing to add, but still here… :-)
Cheers, Keith
There are 3 kinds of mathematician. Those who can count, and those who can't.
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread Neil Dennis via 4D_Tech
> I'd like to build a little test db to see if I can replicate it there... but 
> I probably won't.

I was able to replicate this years ago.

You could try leaving the automatic relation, but set the table in question to 
read only before the sort.

However it is best to just get rid of the automatic relations… they change 
current records a lot and cause locked records etc.

My coding practice is to use all relations manual, turn them on 
programmatically for things like selection to array etc. Then the relations 
only fire when I need them to and not everywhere. You can turn relations on and 
off on a field by field basis (unless you are using a really old version of 4d)

Neil

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread Alan Tilson via 4D_Tech
I was just searching for 9906 SQL error threads and I found 4 in gmail, 1
in French at discuss.4d.com and 0 in kb.4d.com. So everything doesn't seem
to be there...
FYI,
Alan

On Mon, Jan 11, 2021 at 2:21 PM Alan Tilson  wrote:

> Well, it is pretty strange.
> I tried turning off this particular automatic relation before the sort but
> that didn't work.
> I had to actually change the relation itself.
> I'd like to build a little test db to see if I can replicate it there...
> but I probably won't.
> I'm glad some of you are still out there... I felt rather strange when I
> realize the emails had basically stopped.
> gmail currently shows that I have 27,619 threads in my 4D folder  8o)
> Alan
>
> On Mon, Jan 11, 2021 at 2:06 PM Neil Dennis  wrote:
>
>>
>> > If anyone is out there...
>> > So is the email list obsolete?
>>
>> A few people are still monitoring, I’m still here because I haven’t
>> turned if off yet. But yes, I consider this email list obsolete.
>>
>> I don’t think that the automatic relations loading a locking a record on
>> a sort is a 4D bug. It has been this way for a while.
>>
>> Neil
>
>
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread Alan Tilson via 4D_Tech
Well, it is pretty strange.
I tried turning off this particular automatic relation before the sort but
that didn't work.
I had to actually change the relation itself.
I'd like to build a little test db to see if I can replicate it there...
but I probably won't.
I'm glad some of you are still out there... I felt rather strange when I
realize the emails had basically stopped.
gmail currently shows that I have 27,619 threads in my 4D folder  8o)
Alan

On Mon, Jan 11, 2021 at 2:06 PM Neil Dennis  wrote:

>
> > If anyone is out there...
> > So is the email list obsolete?
>
> A few people are still monitoring, I’m still here because I haven’t turned
> if off yet. But yes, I consider this email list obsolete.
>
> I don’t think that the automatic relations loading a locking a record on a
> sort is a 4D bug. It has been this way for a while.
>
> Neil
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread THOMAS BENEDICT via 4D_Tech
Another good reason to avoid automatic relations, if possible. 

It’s hard to keep track of all the things that 4D does behind the scenes.

Tom Benedict

> On 01/11/2021 11:06 AM Neil Dennis via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
>  
> > If anyone is out there...
> > So is the email list obsolete?
> 
> A few people are still monitoring, I’m still here because I haven’t turned if 
> off yet. But yes, I consider this email list obsolete.
> 
> I don’t think that the automatic relations loading a locking a record on a 
> sort is a 4D bug. It has been this way for a while.
> 
> Neil
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread Neil Dennis via 4D_Tech

> If anyone is out there...
> So is the email list obsolete?

A few people are still monitoring, I’m still here because I haven’t turned if 
off yet. But yes, I consider this email list obsolete.

I don’t think that the automatic relations loading a locking a record on a sort 
is a 4D bug. It has been this way for a while.

Neil
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread Ken Geiger Gmail via 4D_Tech
We’re still here. 

Sent from my iPhone

> On Jan 11, 2021, at 11:48 AM, Alan Tilson via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> If anyone is out there...
> So is the email list obsolete?
> Thanks,
> Alan
> 
>> On Mon, Jan 11, 2021 at 1:24 PM Alan Tilson  wrote:
>> 
>> Hello everyone,
>> 
>> I apologize for not continuing to let you know what was happening
>> in my exploration of this issue. I think I found a 4D bug but it could be
>> database corruption I suppose.
>> 
>> The record locking was caused by sorting a related many (automatic) table
>> within the transaction, where my guess is that the parent record was
>> reloaded multiple times.
>> 
>> Changing the relation to manual fixed the problem in the one place where
>> it was very repeatable. The other more long-term occasional problem may be
>> better but it doesn't seem to be fixed.
>> 
>> I kept tracing through the code that ran on opening the detail form and
>> stopping at different places to see if the locking had occurred and it was
>> only the sort that caused the problem.
>> 
>> This occurred in v17.4 and v17.5.
>> 
>> Thanks,
>> Alan
>> 
>>> On Thu, Dec 10, 2020 at 11:42 PM Guy Algot  wrote:
>>> 
>>> Alan,
>>> 
>>> Have you tried using ‘Get locked records info’?
>>> 
>>> 
>>> 
>>> On Dec 8, 2020, at 1:22 PM, Alan Tilson via 4D_Tech <4d_tech@lists.4d.com>
>>> wrote:
>>> 
>>> Hello everyone,
>>> 
>>> I'm having a record locking problem where I cannot understand how the
>>> record is staying locked. There is no open transaction and no record stack
>>> (Push Record).
>>> 
>>> I simply open a record from a list view and close it. The table is still
>>> read-write but the record is unloaded. Load Record can load another record
>>> without releasing the locked record.
>>> 
>>> I don't see anything in the trigger code that would keep the record locked
>>> and trigger issues discussed here seem to affect related tables, not the
>>> main table.
>>> 
>>> Opening another record in the offending process does unlock the locked
>>> record, but users report that sometimes this does not work. They have to
>>> close the process.
>>> 
>>> 4D v17.4 Client Server, Windows Server 2008 R2 server and client
>>> 
>>> I'm thinking to try going to read-only in the list view to see if that
>>> works but I would love to hear some other ideas!
>>> 
>>> Thanks,
>>> Alan Tilson
>>> 
>>> On Fri, Aug 29, 2014 at 1:33 AM Justin Leavens 
>>> wrote:
>>> 
>>> Ben Kershaw-3 wrote
>>> 
>>> Create a method that calls READ ONLY(*), and set the method to execute on
>>> the server. Call this method from your init process method (I’m assuming
>>> you have one).
>>> 
>>> If the problem is a trigger loading a record in another table and leaving
>>> it locked, this will start all tables in READ ONLY mode, so when the
>>> record is loaded it will be in READ ONLY state.
>>> 
>>> If you still have records getting locked, at least you’ll know it has
>>> nothing to do with triggers or something running in the servers ‘twin’
>>> process.
>>> 
>>> 
>>> Thanks, Ben. Indeed I found the culprit was a related table being loaded
>>> in
>>> a trigger and not being unloaded. This resulted in the record being
>>> reported
>>> locked by the process (yes, I use Chuck's locked record component) yet
>>> zero
>>> records loaded on the client. And this of course worked differently in
>>> client server than it did in single user. Thanks for the tip!
>>> 
>>> 
>>> 
>>> 
>>> Later,
>>> 
>>> Guy
>>> 
>>> 
>>> --
>>> 
>>> Guy Algot, Solutions Specialist
>>> 
>>> Edmonton, Alberta
>>> 
>>> (780) 974-8538
>>> 
>>> 
>>> hardware, installation, training, support, programming, internet
>>> 
>>> specializing in 4th Dimension
>>> 
>>> =-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> 
>>> "Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
>>> 
>>> they use Borg to do their marketing and Ferengi to do their programming."
>>> 
>>>-- Simon Slavin
>>> 
>>> 
>>> 
>>> 
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread Alan Tilson via 4D_Tech
If anyone is out there...
So is the email list obsolete?
Thanks,
Alan

On Mon, Jan 11, 2021 at 1:24 PM Alan Tilson  wrote:

> Hello everyone,
>
> I apologize for not continuing to let you know what was happening
> in my exploration of this issue. I think I found a 4D bug but it could be
> database corruption I suppose.
>
> The record locking was caused by sorting a related many (automatic) table
> within the transaction, where my guess is that the parent record was
> reloaded multiple times.
>
> Changing the relation to manual fixed the problem in the one place where
> it was very repeatable. The other more long-term occasional problem may be
> better but it doesn't seem to be fixed.
>
> I kept tracing through the code that ran on opening the detail form and
> stopping at different places to see if the locking had occurred and it was
> only the sort that caused the problem.
>
> This occurred in v17.4 and v17.5.
>
> Thanks,
> Alan
>
> On Thu, Dec 10, 2020 at 11:42 PM Guy Algot  wrote:
>
>> Alan,
>>
>> Have you tried using ‘Get locked records info’?
>>
>>
>>
>> On Dec 8, 2020, at 1:22 PM, Alan Tilson via 4D_Tech <4d_tech@lists.4d.com>
>> wrote:
>>
>> Hello everyone,
>>
>> I'm having a record locking problem where I cannot understand how the
>> record is staying locked. There is no open transaction and no record stack
>> (Push Record).
>>
>> I simply open a record from a list view and close it. The table is still
>> read-write but the record is unloaded. Load Record can load another record
>> without releasing the locked record.
>>
>> I don't see anything in the trigger code that would keep the record locked
>> and trigger issues discussed here seem to affect related tables, not the
>> main table.
>>
>> Opening another record in the offending process does unlock the locked
>> record, but users report that sometimes this does not work. They have to
>> close the process.
>>
>> 4D v17.4 Client Server, Windows Server 2008 R2 server and client
>>
>> I'm thinking to try going to read-only in the list view to see if that
>> works but I would love to hear some other ideas!
>>
>> Thanks,
>> Alan Tilson
>>
>> On Fri, Aug 29, 2014 at 1:33 AM Justin Leavens 
>> wrote:
>>
>> Ben Kershaw-3 wrote
>>
>> Create a method that calls READ ONLY(*), and set the method to execute on
>> the server. Call this method from your init process method (I’m assuming
>> you have one).
>>
>> If the problem is a trigger loading a record in another table and leaving
>> it locked, this will start all tables in READ ONLY mode, so when the
>> record is loaded it will be in READ ONLY state.
>>
>> If you still have records getting locked, at least you’ll know it has
>> nothing to do with triggers or something running in the servers ‘twin’
>> process.
>>
>>
>> Thanks, Ben. Indeed I found the culprit was a related table being loaded
>> in
>> a trigger and not being unloaded. This resulted in the record being
>> reported
>> locked by the process (yes, I use Chuck's locked record component) yet
>> zero
>> records loaded on the client. And this of course worked differently in
>> client server than it did in single user. Thanks for the tip!
>>
>>
>>
>>
>> Later,
>>
>> Guy
>>
>>
>> --
>>
>> Guy Algot, Solutions Specialist
>>
>> Edmonton, Alberta
>>
>> (780) 974-8538
>>
>>
>> hardware, installation, training, support, programming, internet
>>
>> specializing in 4th Dimension
>>
>> =-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>> "Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
>>
>> they use Borg to do their marketing and Ferengi to do their programming."
>>
>> -- Simon Slavin
>>
>>
>>
>>
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2021-01-11 Thread Alan Tilson via 4D_Tech
Hello everyone,

I apologize for not continuing to let you know what was happening
in my exploration of this issue. I think I found a 4D bug but it could be
database corruption I suppose.

The record locking was caused by sorting a related many (automatic) table
within the transaction, where my guess is that the parent record was
reloaded multiple times.

Changing the relation to manual fixed the problem in the one place where it
was very repeatable. The other more long-term occasional problem may be
better but it doesn't seem to be fixed.

I kept tracing through the code that ran on opening the detail form and
stopping at different places to see if the locking had occurred and it was
only the sort that caused the problem.

This occurred in v17.4 and v17.5.

Thanks,
Alan

On Thu, Dec 10, 2020 at 11:42 PM Guy Algot  wrote:

> Alan,
>
> Have you tried using ‘Get locked records info’?
>
>
>
> On Dec 8, 2020, at 1:22 PM, Alan Tilson via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
>
> Hello everyone,
>
> I'm having a record locking problem where I cannot understand how the
> record is staying locked. There is no open transaction and no record stack
> (Push Record).
>
> I simply open a record from a list view and close it. The table is still
> read-write but the record is unloaded. Load Record can load another record
> without releasing the locked record.
>
> I don't see anything in the trigger code that would keep the record locked
> and trigger issues discussed here seem to affect related tables, not the
> main table.
>
> Opening another record in the offending process does unlock the locked
> record, but users report that sometimes this does not work. They have to
> close the process.
>
> 4D v17.4 Client Server, Windows Server 2008 R2 server and client
>
> I'm thinking to try going to read-only in the list view to see if that
> works but I would love to hear some other ideas!
>
> Thanks,
> Alan Tilson
>
> On Fri, Aug 29, 2014 at 1:33 AM Justin Leavens  wrote:
>
> Ben Kershaw-3 wrote
>
> Create a method that calls READ ONLY(*), and set the method to execute on
> the server. Call this method from your init process method (I’m assuming
> you have one).
>
> If the problem is a trigger loading a record in another table and leaving
> it locked, this will start all tables in READ ONLY mode, so when the
> record is loaded it will be in READ ONLY state.
>
> If you still have records getting locked, at least you’ll know it has
> nothing to do with triggers or something running in the servers ‘twin’
> process.
>
>
> Thanks, Ben. Indeed I found the culprit was a related table being loaded in
> a trigger and not being unloaded. This resulted in the record being
> reported
> locked by the process (yes, I use Chuck's locked record component) yet zero
> records loaded on the client. And this of course worked differently in
> client server than it did in single user. Thanks for the tip!
>
>
>
>
> Later,
>
> Guy
>
>
> --
>
> Guy Algot, Solutions Specialist
>
> Edmonton, Alberta
>
> (780) 974-8538
>
>
> hardware, installation, training, support, programming, internet
>
> specializing in 4th Dimension
>
> =-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> "Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
>
> they use Borg to do their marketing and Ferengi to do their programming."
>
> -- Simon Slavin
>
>
>
>
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread Charles Miller via 4D_Tech
I had thought you were using my locked record component. Doesn’t it turn
who had it locked

On Thu, Dec 10, 2020 at 7:47 PM nug via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Alan,
> You need to add/use the commands for returning the lock record information.
> His can help determine who/where is locking the record.
>
> I am wondering if maybe the lock is indirect
> i.e. a parent record locked because a child is loaded read/write and, the
> parent record was dragged in to the modification of the child record due to
> automatic relation loading the parent
>
> Ex: a lineitem is being modified, and an automatic relation (possibly many
> levels removed) pulled and loaded the invoice which is being locked because
> there is a changed child record
>
> Just guessing
> Again - add record looking info commands to get a better idea
>
> Chip
>
>
> > On Dec 10, 2020, at 4:11 PM, Ben Kershaw via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Alan Tilson wrote:
> >
> >> Locked By does return the locking process, user, machine, and proc name.
> >
> > Is the server holding the lock, or is another client? If it’s on the
> server, is it in the twin process for the client, a twin process for
> another client, or another process on the server?
> >
> > Regards,
> > Ben
> > **
> > 4D Internet Users Group (4D iNUG)
> > New Forum: https://discuss.4D.com
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
>
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  https://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption from
disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread nug via 4D_Tech
Alan,
You need to add/use the commands for returning the lock record information.
His can help determine who/where is locking the record.

I am wondering if maybe the lock is indirect
i.e. a parent record locked because a child is loaded read/write and, the 
parent record was dragged in to the modification of the child record due to 
automatic relation loading the parent

Ex: a lineitem is being modified, and an automatic relation (possibly many 
levels removed) pulled and loaded the invoice which is being locked because 
there is a changed child record

Just guessing
Again - add record looking info commands to get a better idea

Chip
 

> On Dec 10, 2020, at 4:11 PM, Ben Kershaw via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Alan Tilson wrote:
> 
>> Locked By does return the locking process, user, machine, and proc name.
> 
> Is the server holding the lock, or is another client? If it’s on the server, 
> is it in the twin process for the client, a twin process for another client, 
> or another process on the server?
> 
> Regards,
> Ben
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread Ben Kershaw via 4D_Tech
Alan Tilson wrote:

>Locked By does return the locking process, user, machine, and proc name.

Is the server holding the lock, or is another client? If it’s on the server, is 
it in the twin process for the client, a twin process for another client, or 
another process on the server?

Regards,
Ben
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread Douglas von Roeder via 4D_Tech
Ben:

"4/4 in D flat, naturally."
:-)

--
Douglas von Roeder
949-910-4084


On Thu, Dec 10, 2020 at 1:06 PM Ben Kershaw via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Douglas von Roeder wrote:
>
> >One of our 4D musicians needs to make a blues song out of this.
>
> I play bass & piano, but haven’t written anything original. Maybe now’s
> the time:
>
> “Record locking woes”
> “My index dun left me”
> “My old code got no Class”
> “Everything seems OK”
>
> 4/4 in D flat, naturally.
>
> Hmmm…
>
> Regards,
> Ben
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread Ben Kershaw via 4D_Tech
Douglas von Roeder wrote:

>One of our 4D musicians needs to make a blues song out of this.

I play bass & piano, but haven’t written anything original. Maybe now’s the 
time:

“Record locking woes”
“My index dun left me”
“My old code got no Class”
“Everything seems OK”

4/4 in D flat, naturally.

Hmmm…

Regards,
Ben
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread Keisuke Miyako via 4D_Tech
If you CUT NAMED SELECTION when there is a loaded current record,
the current selection will be reduced to 0
but the current record will remain loaded (and locked) outside the current 
selection.

2020/12/11 2:38、Alan Tilson via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
there are zero records of this table in the selection but one is locked.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread Alan Tilson via 4D_Tech
Hello Ben,
Interesting idea.
Tracing this on the server shows that there are zero records of this table
in the selection but one is locked.
And Unload Record doesn't change anything.
Any other ideas? And the Transaction Level is zero.
I do lock all tables at process startup on client and server, but then I
set the active table to Read-Write for most tables. Testing not doing this
and only unlocking the current table when opening a record didn't fix my
problem.
Thanks,
Alan


On Wed, Dec 9, 2020 at 3:55 PM Ben Kershaw via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Alan Tilson wrote:
>
> >I'm having a record locking problem where I cannot understand how the
> >record is staying locked. There is no open transaction and no record stack
> >(Push Record).
>
> It could be that the process on the server (the one the trigger runs in)
> still has it loaded in a locked state. To test this, create a method with
> the “Execute on Server” attribute set, and call UNLOAD RECORD from that
> method. Call the method from the client when you close the edit window; the
> method will run in (what is known as) the “twin” process on the server and
> free the record.
>
> When a new process starts, all tables are in a read/write state, and any
> records loaded will be locked to other processes/users. I run a standard
> init method for new processes that sets all tables to read only, and also
> runs a method on the server that does the same thing for the “twin” process.
>
> Regards,
> Ben Kershaw
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-10 Thread Alan Tilson via 4D_Tech
Hello John,
I am generally relying on the standard built-in warning when opening a
locked record that 4d does, but Locked By does return the locking process,
user, machine, and proc name.
And I am only seeing this so far on client-server.
Thanks,
Alan

On Wed, Dec 9, 2020 at 9:25 AM John DeSoi  wrote:

> Are you using LOCKED BY to determine which user/process has the record
> locked? In version 17 through 18R3 I have seen an intermittent bug where
> Locked returns true but LOCKED BY indicates there is no lock. Only one
> process uses the record, so it should not be locked. But I'm only seeing
> this in single user mode, not client/server.
>
> John DeSoi, Ph.D.
>
>
> > On Dec 8, 2020, at 3:32 PM, Alan Tilson via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Well, going to read-only in the list view didn't change anything...
> > But this doesn't happen on all or even most tables...
> > Any ideas?
>
>
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-09 Thread Douglas von Roeder via 4D_Tech
One of our 4D musicians needs to make a blues song out of this.

--
Douglas von Roeder
949-910-4084


On Wed, Dec 9, 2020 at 12:55 PM Ben Kershaw via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Alan Tilson wrote:
>
> >I'm having a record locking problem where I cannot understand how the
> >record is staying locked. There is no open transaction and no record stack
> >(Push Record).
>
> It could be that the process on the server (the one the trigger runs in)
> still has it loaded in a locked state. To test this, create a method with
> the “Execute on Server” attribute set, and call UNLOAD RECORD from that
> method. Call the method from the client when you close the edit window; the
> method will run in (what is known as) the “twin” process on the server and
> free the record.
>
> When a new process starts, all tables are in a read/write state, and any
> records loaded will be locked to other processes/users. I run a standard
> init method for new processes that sets all tables to read only, and also
> runs a method on the server that does the same thing for the “twin” process.
>
> Regards,
> Ben Kershaw
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-09 Thread Ben Kershaw via 4D_Tech
Alan Tilson wrote:

>I'm having a record locking problem where I cannot understand how the
>record is staying locked. There is no open transaction and no record stack
>(Push Record).

It could be that the process on the server (the one the trigger runs in) still 
has it loaded in a locked state. To test this, create a method with the 
“Execute on Server” attribute set, and call UNLOAD RECORD from that method. 
Call the method from the client when you close the edit window; the method will 
run in (what is known as) the “twin” process on the server and free the record.

When a new process starts, all tables are in a read/write state, and any 
records loaded will be locked to other processes/users. I run a standard init 
method for new processes that sets all tables to read only, and also runs a 
method on the server that does the same thing for the “twin” process.

Regards,
Ben Kershaw
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-09 Thread John DeSoi via 4D_Tech
Are you using LOCKED BY to determine which user/process has the record locked? 
In version 17 through 18R3 I have seen an intermittent bug where Locked returns 
true but LOCKED BY indicates there is no lock. Only one process uses the 
record, so it should not be locked. But I'm only seeing this in single user 
mode, not client/server.

John DeSoi, Ph.D.


> On Dec 8, 2020, at 3:32 PM, Alan Tilson via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Well, going to read-only in the list view didn't change anything...
> But this doesn't happen on all or even most tables...
> Any ideas?

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-08 Thread Alan Tilson via 4D_Tech
Well, going to read-only in the list view didn't change anything...
But this doesn't happen on all or even most tables...
Any ideas?
Alan


On Tue, Dec 8, 2020 at 3:22 PM Alan Tilson  wrote:

> Hello everyone,
>
> I'm having a record locking problem where I cannot understand how the
> record is staying locked. There is no open transaction and no record stack
> (Push Record).
>
> I simply open a record from a list view and close it. The table is still
> read-write but the record is unloaded. Load Record can load another record
> without releasing the locked record.
>
> I don't see anything in the trigger code that would keep the record locked
> and trigger issues discussed here seem to affect related tables, not the
> main table.
>
> Opening another record in the offending process does unlock the locked
> record, but users report that sometimes this does not work. They have to
> close the process.
>
> 4D v17.4 Client Server, Windows Server 2008 R2 server and client
>
> I'm thinking to try going to read-only in the list view to see if that
> works but I would love to hear some other ideas!
>
> Thanks,
> Alan Tilson
>
> On Fri, Aug 29, 2014 at 1:33 AM Justin Leavens  wrote:
>
>> Ben Kershaw-3 wrote
>> > Create a method that calls READ ONLY(*), and set the method to execute
>> on
>> > the server. Call this method from your init process method (I’m assuming
>> > you have one).
>> >
>> > If the problem is a trigger loading a record in another table and
>> leaving
>> > it locked, this will start all tables in READ ONLY mode, so when the
>> > record is loaded it will be in READ ONLY state.
>> >
>> > If you still have records getting locked, at least you’ll know it has
>> > nothing to do with triggers or something running in the servers ‘twin’
>> > process.
>>
>> Thanks, Ben. Indeed I found the culprit was a related table being loaded
>> in
>> a trigger and not being unloaded. This resulted in the record being
>> reported
>> locked by the process (yes, I use Chuck's locked record component) yet
>> zero
>> records loaded on the client. And this of course worked differently in
>> client server than it did in single user. Thanks for the tip!
>>
>>
>>
>> --
>> View this message in context:
>> http://4d.1045681.n5.nabble.com/Record-locking-woes-tp5732498p5732638.html
>> Sent from the 4D Tech mailing list archive at Nabble.com.
>> **
>> See how easy it is to extend your 4D solutions to Web and mobile. New
>> opportunities await you with 4D v14!
>>
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>>
>
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Record locking woes

2020-12-08 Thread Alan Tilson via 4D_Tech
Hello everyone,

I'm having a record locking problem where I cannot understand how the
record is staying locked. There is no open transaction and no record stack
(Push Record).

I simply open a record from a list view and close it. The table is still
read-write but the record is unloaded. Load Record can load another record
without releasing the locked record.

I don't see anything in the trigger code that would keep the record locked
and trigger issues discussed here seem to affect related tables, not the
main table.

Opening another record in the offending process does unlock the locked
record, but users report that sometimes this does not work. They have to
close the process.

4D v17.4 Client Server, Windows Server 2008 R2 server and client

I'm thinking to try going to read-only in the list view to see if that
works but I would love to hear some other ideas!

Thanks,
Alan Tilson

On Fri, Aug 29, 2014 at 1:33 AM Justin Leavens  wrote:

> Ben Kershaw-3 wrote
> > Create a method that calls READ ONLY(*), and set the method to execute on
> > the server. Call this method from your init process method (I’m assuming
> > you have one).
> >
> > If the problem is a trigger loading a record in another table and leaving
> > it locked, this will start all tables in READ ONLY mode, so when the
> > record is loaded it will be in READ ONLY state.
> >
> > If you still have records getting locked, at least you’ll know it has
> > nothing to do with triggers or something running in the servers ‘twin’
> > process.
>
> Thanks, Ben. Indeed I found the culprit was a related table being loaded in
> a trigger and not being unloaded. This resulted in the record being
> reported
> locked by the process (yes, I use Chuck's locked record component) yet zero
> records loaded on the client. And this of course worked differently in
> client server than it did in single user. Thanks for the tip!
>
>
>
> --
> View this message in context:
> http://4d.1045681.n5.nabble.com/Record-locking-woes-tp5732498p5732638.html
> Sent from the 4D Tech mailing list archive at Nabble.com.
> **
> See how easy it is to extend your 4D solutions to Web and mobile. New
> opportunities await you with 4D v14!
>
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**