_BtDelete() Function

 

<< Click to Display Table of Contents >>

Navigation:  Low Level Functions >

 

_BtDelete() Function

 

Previous pageReturn to chapter overviewNext page

 

Purpose

 

 

Deletes the current record in an open Btrieve File

 

 

 

Prototype

 

 

FUNCTION _BtDelete ( hFile AS PTR )  AS LOGIC

 

 

 

Argument(s)

 

 

<hFile>File handle that was returned by _BtOpen

 

 

 

 

Return

 

 

LOGICWas the delete operation succesful.

 

 

 

Description

 

 

With this function you can delete records from a file

The following prerequisites apply when performing a Delete operation:

The file must be open.

You must have a physical or logical current record in the file. This requirement is satisfied IF the previous operation was a valid Get (except Extended Gets or Get Key), STEP (except Extended Steps), Insert, or Update.

To delete (or update) a record while inside a transaction, the record must have been retrieved while inside that transaction and not before.

 

Positioning

The Delete operation destroys the complete physical location information and the logical current record position but leaves the positions of the logical next record and logical previous record unchanged.

 

When an error occurs deleting the record , the return value is FALSE and the Bt_Error() function returns one of the following values:

08Invalid Positioning
14Pre-image Open Error
15Pre-image I/O Error
80Conflict
83Read Outside Transaction

 

 

 

 

See Also

 

 

_BtInsert()