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
**