Page 1 of 1

update servoy sequence

PostPosted: Mon Oct 10, 2011 7:28 pm
by rogel
http://wiki.servoy.com/display/public/DOCS/Database+Connections
Update Servoy Sequences
Code: Select all
...external processes inserted new records in the tables for which Servoy manages the sequences when Solutions insert records into those tables, the internal counter will be out of sync with the actual records in the database. The option to update the Servoy Sequences will look at the max value in each table and update the internal counter inside Servoy, bringing them in sync again.

I have a table that uses servoy sequence. Where is that option/method to update the internal counter located?

Re: update servoy sequence

PostPosted: Mon Oct 10, 2011 7:36 pm
by ROCLASI
Hi Rogel,

In Servoy Server you find this option in the Database Servers page. Each connection has that option.
In Developer you find this option in the auto-enter options on the table. Select the field and you find the sync option under the sequence tab.

Hope this helps.

Re: update servoy sequence

PostPosted: Mon Oct 10, 2011 8:04 pm
by rogel
ROCLASI wrote:Hi Rogel,

In Servoy Server you find this option in the Database Servers page. Each connection has that option.
In Developer you find this option in the auto-enter options on the table. Select the field and you find the sync option under the sequence tab.

Hope this helps.

What I mean is programmatically?

I read an XML file and generate INSERT SQL scripts. And before I ran the generated script I check for the primary key if it exists. How can the sequence be updated after?

Re: update servoy sequence

PostPosted: Mon Oct 10, 2011 8:34 pm
by ROCLASI
Hi Rogel,

There is no (public) API to sync the Servoy Sequences. I guess you can use the HTTP plugin to do trigger the sync button on the Servoy Admin page but that is more of a hack.
I suggest you file a feature request.