update servoy sequence

Questions, tips and tricks and techniques for scripting in Servoy

update servoy sequence

Postby rogel » Mon Oct 10, 2011 7:28 pm

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?
rogel
 
Posts: 264
Joined: Mon Jul 04, 2011 9:09 am

Re: update servoy sequence

Postby ROCLASI » Mon Oct 10, 2011 7:36 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: update servoy sequence

Postby rogel » Mon Oct 10, 2011 8:04 pm

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?
rogel
 
Posts: 264
Joined: Mon Jul 04, 2011 9:09 am

Re: update servoy sequence

Postby ROCLASI » Mon Oct 10, 2011 8:34 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Methods

Who is online

Users browsing this forum: No registered users and 7 guests