Difference between revisions of "SEQNO()"
(→Products) |
Yvonne.milne (Talk | contribs) (→See Also) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return a unique sequence number | Function to return a unique sequence number | ||
− | |||
==Syntax== | ==Syntax== | ||
SEQNO([<workarea | alias>]) | SEQNO([<workarea | alias>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[CURRSEQNO()]], [[RECNO()]], [[REPLACE()]], [[SET | + | [[CURRSEQNO()]], [[RECNO()]], [[REPLACE()]], [[SET SEQNO]], [[TABLESEQNO()]], [[UNIQUEROWID()]], [[ZAP]] |
− | + | ||
==Description== | ==Description== | ||
Line 15: | Line 12: | ||
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>. | ||
− | |||
− | |||
− | |||
==Example== | ==Example== | ||
Line 25: | Line 19: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:Lianja VFP Extensions]] | ||
+ | [[Category:VFP Function Extensions]] |
Latest revision as of 07:07, 19 April 2022
Contents
Purpose
Function to return a unique sequence number
Syntax
SEQNO([<workarea | alias>])
See Also
CURRSEQNO(), RECNO(), REPLACE(), SET SEQNO, TABLESEQNO(), 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>.
Example
append blank replace custno with seqno()