# 6.1 Synchronize Wizard and Sequences

**URL:** <https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169>\
**Category:** Classic Servoy\
**Created:** [April 10, 2013, 11:07am UTC](https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169 "2013-04-10T11:07:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdurniak](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gdurniak](https://forum.servoy.com/u/gdurniak)\
**Post date:** [April 10, 2013, 11:07am UTC](https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169/1 "2013-04-10T11:07:14Z")

</div>

From Quick Fix, I just used the Synchronize Wizard to generate a missing dbi file

it set the PK to servoy seq, while that Sybase 10.0.1 column is set to autoincrement

is this correct ?

greg

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [April 15, 2013, 8:26am UTC](https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169/2 "2013-04-15T08:26:58Z")

</div>

Greg,

Servoy tests each table if the pk is autoincrement, regardless of the pk setting.  
If you create new records, which is actually used?

Rob

---

<div class="post-metadata">

**Author:** ![gdurniak](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gdurniak](https://forum.servoy.com/u/gdurniak)\
**Post date:** [April 16, 2013, 2:16pm UTC](https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169/3 "2013-04-16T14:16:51Z")

</div>

if Servoy “tests each table”, then the “bug” is minor. It’s just not displayed properly

( but then the Wizard should “test each table” too )

The “next” serial number is the same, so hard to tell which wins out

greg

> Servoy tests each table if the pk is autoincrement, regardless of the pk setting.

If you create new records, which is actually used?

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [April 16, 2013, 7:40pm UTC](https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169/4 "2013-04-16T19:40:49Z")

</div>

Greg,

For servoy-sequence in developer we do a select-max to find the next value (in ApplicationServer the sequence is managed by the repository).

You could create a few new records, say ids 1, 2, 3  
then delete 2 and 3, restart developer and then create a new record.

in developer, servoy sequence will generate 2, your autoincrement will probably generate 4.

Rob

---

<div class="post-metadata">

**Author:** ![gdurniak](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gdurniak](https://forum.servoy.com/u/gdurniak)\
**Post date:** [April 17, 2013, 9:17am UTC](https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169/5 "2013-04-17T09:17:13Z")

</div>

if you create the record in Servoy, the Servoy Seq is used ( which was a surprise )

if I create the record in Sybase Central, the autoincrement is used

this could be nasty if they get out of sych, e.g. by deleting some records, as you suggested

greg

> If you create new records, which is actually used ?

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [April 23, 2013, 8:52am UTC](https://forum.servoy.com/t/6-1-synchronize-wizard-and-sequences/17169/6 "2013-04-23T08:52:12Z")

</div>

Greg,

What happens if you export this solution to an application server, which sequence will then be used?

Rob
