Difference between revisions of "Using Navigational Data Access Commands in Recital"
Yvonnemilne (Talk | contribs) (→Deleting Records in a Recital Table) |
Yvonnemilne (Talk | contribs) (→Deleting Records in a Recital Table) |
||
Line 59: | Line 59: | ||
===Deleting Records in a Recital Table=== | ===Deleting Records in a Recital Table=== | ||
The deletion of records in a Recital table is a two stage process. The ''delete'' command is used to mark a record for deletion. At this stage, the marked record is hidden if ''set deleted'' is ''on''. With ''set deleted'' set to ''off'', the record is still accessible as normal. Record lists (''list'' and ''display'') will show the deletion marker ''*'' next to the record number and the ''deleted()'' function will return .T. (true). A record marked for deletion can have the mark removed using the ''recall'' command. | The deletion of records in a Recital table is a two stage process. The ''delete'' command is used to mark a record for deletion. At this stage, the marked record is hidden if ''set deleted'' is ''on''. With ''set deleted'' set to ''off'', the record is still accessible as normal. Record lists (''list'' and ''display'') will show the deletion marker ''*'' next to the record number and the ''deleted()'' function will return .T. (true). A record marked for deletion can have the mark removed using the ''recall'' command. | ||
+ | |||
+ | * [[DELETE|delete]] | ||
<pre> | <pre> | ||
− | + | delete [<scope>][for | while <condition as logical>] | |
</pre> | </pre> | ||
+ | |||
+ | * [[RECALL|recall]] | ||
<pre> | <pre> | ||
− | + | recall [<scope>][for | while <condition as logical>] | |
</pre> | </pre> | ||
+ | |||
+ | * [[SET DELETED|set deleted]] | ||
<pre> | <pre> | ||
− | + | set deleted on | off | |
</pre> | </pre> | ||
Line 83: | Line 89: | ||
To physically remove records marked for deletion, the ''pack'' command must be issued on the table. The table must be open for exlusive use. | To physically remove records marked for deletion, the ''pack'' command must be issued on the table. The table must be open for exlusive use. | ||
+ | |||
+ | * [[PACK|pack]] | ||
<pre> | <pre> | ||
− | + | pack | |
</pre> | </pre> | ||
Line 94: | Line 102: | ||
The ''zap'' command can be used to physically delete all the records from a table immediately. The table must be open for exlusive use. | The ''zap'' command can be used to physically delete all the records from a table immediately. The table must be open for exlusive use. | ||
+ | |||
+ | * [[ZAP|zap]] | ||
<pre> | <pre> | ||
− | + | zap | |
</pre> | </pre> | ||
Revision as of 12:35, 16 December 2009
Contents
- 1 Using Navigational Data Access Commands in Recital
- 1.1 Why use Navigational Data Access Commands
- 1.2 Creating a Recital Database
- 1.3 Opening a Recital Database
- 1.4 Creating a Recital Table
- 1.5 Opening a Recital Table
- 1.6 Navigating a Recital Table
- 1.7 Inserting Records into a Recital Table
- 1.8 Updating Records in a Recital Table
- 1.9 Selecting Records from a Recital Table
- 1.10 Adding Records to a Recital Table
- 1.11 Deleting Records in a Recital Table
- 1.12 Obtain Information about a Recital Table
Creating a Recital Database
- CREATE DATABASE
Opening a Recital Database
- OPEN DATABASE
Creating a Recital Table
- CREATE
- CREATE FROM
- COPY STRUCTURE
- COPY TO
- COPY STRUCTURE EXTENDED
- SQL CREATE TABLE
Opening a Recital Table
- SELECT
- SELECT()
- USE
- GOTO
- GOTO()
- INDEX
- REINDEX
- SEEK
- SEEK()
- SKIP
Inserting Records into a Recital Table
- APPEND FROM
- BLANK
- GATHER
- GENERATE
- REPLACE
Updating Records in a Recital Table
- GATHER
- REPLACE
Selecting Records from a Recital Table
- AVERAGE
- COUNT
- DISPLAY
- LIST
- SCAN
- SCATTER
- SUM
- TOTAL
Adding Records to a Recital Table
- APPEND
- APPEND BLANK
- INSERT
Deleting Records in a Recital Table
The deletion of records in a Recital table is a two stage process. The delete command is used to mark a record for deletion. At this stage, the marked record is hidden if set deleted is on. With set deleted set to off, the record is still accessible as normal. Record lists (list and display) will show the deletion marker * next to the record number and the deleted() function will return .T. (true). A record marked for deletion can have the mark removed using the recall command.
delete [<scope>][for | while <condition as logical>]
recall [<scope>][for | while <condition as logical>]
set deleted on | off
set deleted off use example goto 10 delete echo deleted() // .T. recall echo deleted() // .F.
To physically remove records marked for deletion, the pack command must be issued on the table. The table must be open for exlusive use.
pack
use example exclusive pack
The zap command can be used to physically delete all the records from a table immediately. The table must be open for exlusive use.
zap
use example exclusive zap
Obtain Information about a Recital Table
- DISPLAY/LIST STRUCTURE
- DISPLAY/LIST INDEX
- DISPLAY/LIST
- BOF()
- EOF()
- FIELD()
- FIELDNAME()
- FLDLIST()
- INUSE()
- RECNO()
- REFERENCES()
- USED()