Difference between revisions of "Using Navigational Data Access Commands in Recital"

From Recital Documentation Wiki
Jump to: navigation, search
(Inserting Data into a Recital Table)
(Deleting Records in a Recital Table)
Line 58: Line 58:
  
 
===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.
 +
 +
<pre>
 +
character = procname()
 +
</pre>
 +
 
* DELETE
 
* DELETE
 
* PACK
 
* PACK
Line 63: Line 69:
 
* SET DELETED
 
* SET DELETED
 
* ZAP
 
* ZAP
 +
To physically remove records marked for deletion, the ''pack'' command must be issued on the table.  The table must be open for exlusive use.
 +
 +
<code lang="recital">
 +
use example exclusive
 +
pack
 +
</code>
  
 
===Obtain Information about a Recital Table===
 
===Obtain Information about a Recital Table===

Revision as of 12:21, 16 December 2009

Using Navigational Data Access Commands in Recital

Why use Navigational Data Access Commands

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

Navigating a Recital Table

  • 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.

character = procname()
  • DELETE
  • PACK
  • RECALL
  • SET DELETED
  • ZAP

To physically remove records marked for deletion, the pack command must be issued on the table. The table must be open for exlusive use.

use example exclusive
pack

Obtain Information about a Recital Table

  • DISPLAY/LIST STRUCTURE
  • DISPLAY/LIST INDEX
  • DISPLAY/LIST
  • BOF()
  • EOF()
  • FIELD()
  • FIELDNAME()
  • FLDLIST()
  • INUSE()
  • RECNO()
  • REFERENCES()
  • USED()