Difference between revisions of "SEQNO()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(Products)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SEQNO()=
 
 
 
==Class==
 
Table Basics
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to return a unique sequence number
 
Function to return a unique sequence number
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[ZAP]], [[REPLACE()]], [[SET POSTRECORD]], [[SET SEQNO]]
+
[[CURRSEQNO()]], [[RECNO()]], [[REPLACE()]], [[SET POSTRECORD]], [[SET SEQNO]], [[UNIQUEROWID()]], [[ZAP]]
  
  
Line 23: Line 16:
 
The SEQNO() function guarantees a unique sequence number even in a multi-user environment.  The sequence number will continue increasing even after a PACK operation.  A ZAP operation will reset the sequence number to 0.  The sequence number of a table can be reset with the command SET SEQNO TO <expN>.
 
The SEQNO() function guarantees a unique sequence number even in a multi-user environment.  The sequence number will continue increasing even after a PACK operation.  A ZAP operation will reset the sequence number to 0.  The sequence number of a table can be reset with the command SET SEQNO TO <expN>.
  
The SEQNO() function and SET SEQNO command only operate on Recital tables.
+
The SET SEQNO command and CURRSEQNO() and SEQNO() functions are only supported for Recital tables.  
  
  
Line 34: Line 27:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 16:18, 7 December 2009

Purpose

Function to return a unique sequence number


Syntax

SEQNO([<workarea | alias>])


See Also

CURRSEQNO(), RECNO(), REPLACE(), SET POSTRECORD, SET SEQNO, UNIQUEROWID(), ZAP


Description

The SEQNO() function returns the next unique sequence number for the current table. Automatic locking is performed during the operation of this function if the specified table is opened shareable. The optional <workarea | alias> will return the next unique sequence number from the specified table. If there is no active table the SEQNO() function will return 0.

The SEQNO() function guarantees a unique sequence number even in a multi-user environment. The sequence number will continue increasing even after a PACK operation. A ZAP operation will reset the sequence number to 0. The sequence number of a table can be reset with the command SET SEQNO TO <expN>.

The SET SEQNO command and CURRSEQNO() and SEQNO() functions are only supported for Recital tables.


Example

append blank
replace custno with seqno()


Products

Recital, Recital Server