Primary Key question

Hello, I have a situation where I have to import data using MS SQL Server tools. Now there is a problem with primary keys: it looks like Servoy “counts” a sequence itself instead using a sequence from the database. If an ID is a primary key column managed by Servoy, you cannot use the database to move data around for the sequence won’t be updated in that case and the import fails (because NULL values are entered in a non-NULL column). If you set the ID to have a database managed sequence, Servoy has a problem since it relies on it’s own sequence handling.

Am I getting this right? What can we do if we encounter a situation like the one described?

Yes currently servoy uses it’s own sequences. Currently we can’t handle database sequences that is planned for release 1.5 (then we will have database dependend features in servoy)

if you move data from one database to another database and you regenerate the pk’s there how do you keep youre Foreign key’s in sync?

I can’t. My situation to start from scratch. I will be taking care of keys myself. I am moving from a system where everything was in sync, so all I have to to is update my date after import accordingly.

At least I can set the sequence in Servoy, can’t I. So during import I can use database driven sequences, then figure out the highest value and enter something bigger than that in Servoys data provider, right?

It’s quite a lot of work, though.

After the import with db sequences you can sync servoy with those sequences to open the data providers dialog and open the properties of the pk dataprovider. Then in the sequence tab you can push the refresh button.

If the native DB sequences are to be released in version 1.5, does this mean we need to wait through versions 1.2, 1.3 and 1.4? :shock: Or, is 1.5 to be the next release?

1.5 will be next version after 1.2 becouse of the major enhancements we do

Great! The native key thing is very important to me. You guys are doing an awesome job responding to your customers!

Thanks,
Martin Wiedemann

mpwiedemann:
You guys are doing an awesome job responding to your customers!

For that’s a FACT 8) … keep up the good work :wink:

With great feedback and commitment from customers we like to make sure its a win:win scenario!