Harbour All Functions – D

Date()
Day()
Days()

DaysInMonth()
DaysToMonth()

dbAppend()
dbClearFilter()
dbCloseAll()
dbCloseArea()
dbCommit()
dbCommitAll()
dbCreate()
dbDelete()
dbEval()
dbF()
dbFilter()
dbGoBottom()
dbGoTo()
dbGoTop()
dbReCall()
dbRLock()
dbRLockList()
dbRUnlock()
dbSeek()
dbSelectArea()
dbSetDriver()
dbSetFilter()
dbSkip()
dbSkipper()
dbStruct()
dbUnlock()
dbUnlockAll()
dbUseArea()

DecToBin()
DecToHexa()
DecToOctal()

Deleted()
Descend()
DevOutPict()
DirChange()
DirRemove()
DiskSpace()

DMY()
Do()
DoW()

DOY
DToC()

DToR
DToS()

Advertisements

Harbour Database Functions

Database Functions

AFields Fills referenced arrays with database field information
Alias Returns the alias name of a work area
BOF Test for the beggining-of-file condition
dbAppend Appends a new record to a database file
dbClearFilter Clears the current filter condiction in a work area
dbCloseAll Close all open files in all work areas.
dbCloseArea Close a database file in a work area
dbCommit Updates all index and database buffers for a given workarea
dbCommitAll Flushes the memory buffer and performs a hard-disk write
dbCreate Creates an empty database from a array
dbDelete Mark a record for deletion in a database
dbEval Performs a code block operation on the current Database
DBF Alias name of a work area
dbFilter Return the filter expression in a work area
dbGoBottom Moves the record pointer to the bottom of the database
dbGoto Position the record pointer to a specific location
dbGoTop Moves the record pointer to the top of the database
dbRecall Recalls a record previousy marked for deletion
dbSeek Searches for a value based on an active index
dbSelectArea Change to another work area
dbSetDriver Establishes the RDD name for the selected work area
dbSetFilter Establishes a filter condition for a work area
dbSkip Moves the record pointer in the selected work area
dbSkipper Helper function to skip a database
dbStruct Builds a multidimensional array of a database structure
dbUseArea Opens a work area and uses a database file
Deleted Tests the record’s deletion flag
EOF Test for end-of-file condition
FCount Counts the number of fields in an active database
FieldDeci Determines the number of decimal places of a given numeric field
FieldGet Obtains the value of a specified field
FieldName Return the name of a field at a numeric field location
FieldPos Return the ordinal position of a field
FieldPut Set the value of a field variable
FieldSize Determines the size of a given field
FieldType Determines the type of a given field
Found Determine the success of a previous search operation
Header Return the length of a database file header
LastRec Returns the number of records in an active work area or database
LUpdate Yields the date the database was last updated
RecCount Counts the number of records in a database
RecNo Returns the current record number or identity
RecSize Returns the size of a single record in an active database
Select Returns the work area number for a specified alias
Used Checks whether a database is in use in a work area

Deleted()

DELETED()

Tests the record’s deletion flag.

Syntax

      DELETED() --> lDeleted

Arguments

(This command has no arguments)

Returns

DELETED() return a logical true (.T.) or false (.F.).

Description

This function returns a logical true (.T.) is the current record in the selected or designated work area ha ben marked for deletion. If not, the function will return a logical false (.F.).

Examples

      PROCEDURE Main()
         USE test NEW
         DBGOTO()
         DBDELETE()
         ? "Is Record Deleted", Test->( DELETED() )
         DBRECALL()
         USE
         RETURN

Compliance

Clipper

Files

Library is rdd

Seealso

DBDELETE()

dbRecall()

DBRECALL()

Recalls a record previousy marked for deletion.

Syntax

      DBRECALL()

Description

This function unmarks those records marked for deletion and reactivates them in the aliased or selected work area. If a record is DELETED and the DELETED setting is on, the record will still be visible for a DBRECALL() provided that the database record pointer has not been skipped. Once a record marked for deletion with the DELETE setting ON has been skipped, it no longer can be brought back with DBRECALL().

Examples

      USE test NEW
      DBGOTO( 10 )
      DBDELETE()
      ? DELETED()
      DBRECALL()
      ? DELETED()
      USE

Compliance

Clipper

Files

Library is rdd

Seealso

DBDELETE()

C5_DBDELETE

 DBDELETE()
 Mark a record for deletion
------------------------------------------------------------------------------
 Syntax

     DBDELETE() --> NIL

 Returns

     DBDELETE() always returns NIL.

 Description

     DBDELETE() marks the current record as deleted.  Records marked for
     deletion can be filtered using SET DELETED or removed from the file
     using the PACK command.

     DBDELETE() performs the same function as the standard DELETE command
     with a scope of the current record.  For more information, refer to the
     DELETE command.

 Notes

     .  Logical records: If the global _SET_DELETED status is true
        (.T.), deleted records are not logically visible.  That is, database
        operations which operate on logical records will not consider records
        marked for deletion.  Note, however, that if _SET_DELETED is true
        (.T.) when the current record is marked for deletion, the record
        remains visible until it is no longer the current record.

     .  Network environment: For a shared database on a network,
        DBDELETE() requires the current record to be locked.  For more
        information, refer to the "Network Programming" chapter of the
        Programming and Utilities Guide.

 Examples

     .  The following example deletes a record after a successful
        record lock:

        cLast := "Winston"
        DBUSEAREA( .T., "DBFNTX", "Sales", "Sales", .T. )
        DBSETINDEX( "LASTNAME" )
        //
        IF ( Sales->(DBSEEK(cLast)) )
           IF Sales->( RLOCK() )
              Sales->( DBDELETE() )
              ? "Record deleted: ", Sales->( DELETED() )
           ELSE
              ? "Unable to lock record..."
           ENDIF
        ELSE
           ? "Not found"
        ENDIF

 Files   Library is CLIPPER.LIB.

See Also: DBRECALL() DELETE RECALL