sstpierre

Best Practice over importing and NextSerialValue in a Runtime Solution

Discussion created by sstpierre on Mar 30, 2017
Latest reply on Mar 30, 2017 by sstpierre

Hi!

I ran into a bad import - did changed my script and in some case it didn't worked correctly.

So now the NextSerialValue is somewhere in the middle of my imported recs in my new RunTime Solution.

 

What I was using for updating the NextSerialValue was : opening the old db silently (hidden) after the imports scripts steps and then using

GetNextSerialValue and then SetNextSerialValue.

 

I did set-up a Global Table for holding values related to tables.

 

But founded that solution is a bit hard, as all table must be related - if I'm not mistaken - to see the value retuned by GetNextSerialValue.

 

I read in the forum many examples where the use of GetNextSerialValue isn't proposed, but instead, after the import and on every table to :

sort them on ID (asc) and retreiving the high bid and sets the next one over that + 1.

 

It avoid the direct openning of the old db, etc.

 

So my first question is : it good to forget about GetNextSerialValue and just use the higher ID + 1 technic ?

 

I'm not ready for data sep, yet, but heard about UUID (!!??$$ )

So if someone can explain me in details the functionning and the migrating process so that I might get my next update using that pattern.

 

tx alot

big fan of the Forum, long life!!

Outcomes