Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-10 Thread Bernd Fröhlich via 4D_Tech
Kirk Brooks: > If a subsequent call to sequence number is made it causes the sequence to > increment. So the final call my test method makes causes the sequence to > increment by 3 even through at the time that call is made the other > processes have quit and 'released' their numbers. Yes, if

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-09 Thread Arnaud de Montard via 4D_Tech
> Le 9 mars 2017 à 17:18, Two Way Communications via 4D_Tech > <4d_tech@lists.4d.com> a écrit : > > [...] > I wonder … has anybody else had issues with Primary keys in combination with > sequence number? Since v11 I use "auto increment": never. About index kind, unique _must_ be b-tree.

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-08 Thread John DeSoi via 4D_Tech
> On Mar 8, 2017, at 6:26 AM, Two Way Communications via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I have exported the data to a tab delimited file, truncated the table, and > imported the data. Problem is still there. > I have compacted the data file. Same problem. After doing this import

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-08 Thread Alan Chan via 4D_Tech
We have been using Sequence Number for years without any problem. It depends how/when you use it My suggestion is to make use of newer features such as Auto-increment on either UUID or Longint. If you don't want to use auto-increment for whatever reasons, you could call it at Trigger for new

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-08 Thread John DeSoi via 4D_Tech
> On Mar 8, 2017, at 9:09 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Currently, let's say a user begins a transaction ​and the new record gets > the sequence number. Before that transaction is completed another user > starts a new record (or that user starts another process

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-08 Thread Arnaud de Montard via 4D_Tech
> Le 8 mars 2017 à 13:26, Two Way Communications via 4D_Tech > <4d_tech@lists.4d.com> a écrit : > > Hi all, > > I ran into an issue while using SEQUENCE NUMBER in 4D v15.4, in a > client-server setup. > > I put the result in a field called ‘ID’, which is the primary key for that > table,

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-08 Thread Nigel Greenlee via 4D_Tech
Rudy In my vast head banging experience of this its usually that a record has been created with no ID, or in the case of sequence the 4D sequence is out of sync. My suspicions would be records in transactions or record deletions Two suggestions.. 1) Put some code in the ‘save’ part of the