Progress Sequence values and Rollbase

Posted by jimgelly on 10-Oct-2014 00:00

Hello,

We are running the Rollbase 3.0.4 Private cloud installation

Directly connected to Openedge database and using external objects created from the database.

Another Rollbase question - our Openedge application uses the progress _seq - sequence values.  In our application we would usually retrieve the next sequence value on a new record and update.

What is the best way in Rollbase to utilise progress sequence values.

Ideally we want to be able to query the current value and then also assign the next value on create.

Is this functionality supported? we have tried to use rollbase triggers with no luck.

Any documentation or suggestions are very appreciated.

Regards

Jim

Posted by Manooj Murali on 10-Oct-2014 00:21

There is a AutoNumber field type in rollbase which can be of use here. As of 3.0.5, autonumber is supported on external objects as well, but only if the jdbc metadata isautoincrement returns true for the sequence column (May be some one from OE can comment on this).

But, the catch is that it is highly encouraged to not set the value of sequence column manually and let the database handle it (most of the db's such as mySQL, SQL Server take care of setting the column value even when its not in the query).

I am not sure how you can achieve this behavior in 3.0.4.

All Replies

Posted by Manooj Murali on 10-Oct-2014 00:21

There is a AutoNumber field type in rollbase which can be of use here. As of 3.0.5, autonumber is supported on external objects as well, but only if the jdbc metadata isautoincrement returns true for the sequence column (May be some one from OE can comment on this).

But, the catch is that it is highly encouraged to not set the value of sequence column manually and let the database handle it (most of the db's such as mySQL, SQL Server take care of setting the column value even when its not in the query).

I am not sure how you can achieve this behavior in 3.0.4.

Posted by Bill Wood on 11-Oct-2014 12:35

The best way to use any ‘database logic’ (including sequences) from an External Database Table from Rollbase is to populate those fields from triggers.  Of course you need to get these from Java triggers as you are going through the SQL Engine, not ABL.     (This is one of the disadvantages of using External Database Tables, vs the OpenEdge Service Object).     In either case, though, you would let the ‘backed’ populate certain fields when a record is created.

This thread is closed