project BLF > class Persistence (other) > method GetNextValue

function returns integer

Description

Lookup next-value of a database sequence


Parameters


icSequenceinputcharacterdatabase sequence name

It is possible to provide extra sequences not known in the application database by extending the persistence layer class and adding a method named 'Next<icSequence>' which will be responsible for returning a unique value.


Internal usage


unused


program code (program1/other.p)

&if defined(DEBUGSQL) > 0 &then
run SqlDebugWrite in {&TARGETPROCEDURE} ("* ":U + program-name(1), 1).
&endif

run SqlGetSequence in {&TARGETPROCEDURE}
   (icSequence, 1, output viSeq, output viReturnStatus).
if viReturnStatus <> 0 
then return ?.
return viSeq.