|
Btrieve OperationsOpen and CloseB_OPEN - Open (0)B_CLOSE - Close (1) B_GETDIR - Get Directory(18) B_SETDIR - Set Directory (17) Reading StandardB_GFIRST - Get First (12)B_GGT - Get Greater (8) B_GGTE - Get Greater or Equal (9) B_GNXT - Get Next (6) B_GET - Get Equal (5) B_GPRV - Get Previous (7) B_GLSE - Get Less Than or Equal(11) B_GLS - Get Less Than (10) B_GLAST - Get Last (13) Reading by PositionB_GETPOS - Get Position (22)B_GETD - Get Direct (23) B_STPD - Step Direct (24) Read ModifiersB_KEY - Get Key Only (+50)B_LOCKW - Lock with Wait (+100) B_LOCKNW - Lock with No Wait (+200) B_MLOCKW - Multiple Lock with Wait (+300) B_MLOCKNW - Multiple Lock with No Wait (+400) B_UNLOCK - Unlock (27) UpdatingB_INS - Insert (2)B_UPD - Update (3) B_DEL - Delete (4) TransactionsBTR_BEGTR - Begin Transaction (19)BTR_ENDTR - End Transaction (20) BTR_ABRTR - Abort Transaction (21) System ControlBTR_RESET - Reset (28)B_STOP - Stop Btrieve and free memory (25) B_VER - Version (26) File Creation and ManipulationB_CREATE - Create (14)B_STAT - Status (15) B_SOWNER - Set Owner (29) B_COWNER - Clear Owner (30) B_CRSIDX - Create Supplemental Index (31) B_DRSIDX - Drop Supplemental Index (32) B_EXTEND - Extend (16) PurposeTo open the file. A full path may be specified. Parameters
DescriptionIf the file has a owner position it in the data buffer, terminated by space
or binary zero.
Topen is the open type:
Current PositioningNo positioning is established. PurposeCloses File. Parameters
Current PositioningRemoves all positioning. PurposeRetrieves the current directory. Returns the current directory for a specified logical drive. Parameters
DescriptionBtrieve returns the current directory, terminated by a binary 0 to the key buffer. The key buffer must be at least 64 characters long. Current PositioningºDoes not affect current positioning. PurposeThis operation set the current directory to a specified value. Parameters
DescriptionIt stores the desidered drive and directory path terminated with a binary 0.If you do not specify the complete path for the directory, Btrieve appends the specified directory path to the current directory. Current PositioningSet Directory has no effect on positioning PurposeRetrieves the record corresponding to the first key value for a specified access path. Parameters
DescriptionEnables your application to retrieve a record which corresponds to the first key value for a specified key number. Btrieve returns the request record in the data buffer and stores the corrisponding key value in the key buffer. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves a record corresponding to a key value greater than the specified key value. Parameters
DescriptionBtrieve ascends the access path specified by the key number to find the first key value greater than the one request. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves a record with a key value greater than or equal to a specific key value Parameters
DescriptionIf the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves the record from a Btrieve file which file follows the currrent record in the key path. Parameters
DescriptionThe application must pass the key buffer exactly as Btrieve returned it on the previous call. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningBtrieve uses the positioning established by the previous call to perform a get next operation. It updates the current positioning after a get next as follows :
PurposeRetrieves a record corresponding to a specific key value Parameters
DescriptionBtrieve returns the length of the record in the data buffer length parameter. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves the record which precedes the current record in the key path Parameters
DescriptionThe application must pass the key buffer exactly as Btrieve returned it on the previous call since Btrieve may need the information previously stored in the key buffer to determine its current position in the file. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves a record with a key value which is less than or equal to a specific key value. Parameters
DescriptionBtrieve first searches the access path for the specified key value. If it does not find the value, it descends the access path for the path specified by the key number to find the first key value less than the one request. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves a record corresponding to the key value which is less than a specified key value Parameters
DescriptionBtrieve descends the access path specified by the key number to find the first key value less than the one requested. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves the corresponding to the last key value for a specified access path. Parameters
DescriptionIf duplicate exist, the record returned is the duplicate, that is, the one inserted most recently. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeReturns the physical position of the current record Parameters
DescriptionBtrieve returns the location of the record in the data buffer, and sets the data buffer length to 4 bytes. The position is a 4-byte binary value which is the record's byte offset into the file. Btrieve does not perform any disk I/O to process a get position request. Current PositioningA get position operation does not affect current positioning. PurposeRetrieves the data record positioned at a specified physical adress in the Btrieve file. Parameters
DescriptionThe application specifies the record's location as its 4-byte offset from the start of the file. It obtains the 4-byte offset of a record with the get position operation. If the record is too long Btrieve returns as much as it can with a status of 22. Current PositioningAs follows:
PurposeRetrieves a record in the location phisically following the current record Parameters
DescriptionA Step direct operation immediatly after any get operation returns the record phisically following the record retrieved by the previous get operation. If the record is too long, Btrieve returns as much as it can with a status of 22. Current PositioningThe step direct operation establishes no positioning. PurposeGet key allows you to perform a get operation without actually retrieving a data record, and can be used with any of the following operation:
ParametersAdd value to get operation. Other parameters are the same as those specified in the get operation. Current PositioningEstablishes the current positioning exactly as the corresponding get operation does, except that get next key and get previous key do not return duplicates.
PurposeGets a record and locks it. A single record wait lock. ParametersAdd value to get operation. Other parameters are the same as those specified in the get operation. DescriptionIf another station has the record locked or has a transaction pending
for the file, Btrieve waits until the record is available before
returning control to the application. When you want to specify a wait
transaction, set the operation code to 119.
PurposeLock, with the nowait option, gets a record and locks it. A single record nowait lock. ParametersAdd value to get operation. Other parameters are the same as those specified in the get operation. DescriptionIf another station has the record locked or as a transaction pending for the file, Btrieve immediately returns a status of 84 ,indicating that the lock is busy. You may also issue a nowait begin transaction request with an operation code of 219.
PurposeGets a record and locks it. A multiple record wait lock. ParametersAdd value to get operation. Other parameters are the same as those specified in the get operation. DescriptionIf another station has the record locked or has a transaction pending for the file, Btrieve waits until the record is available before returning control to the application. When you want to specify a wait transaction, set the operation code to 319.
PurposeLock, with the nowait option, gets a record and locks it. A multiple record nowait lock. ParametersAdd value to get operation. Other parameters are the same as those specified in the get operation. DescriptionIf another station has the record locked or as a transaction pending for the file, Btrieve immediately returns a status of 85 ,indicating that the lock is busy. You may also issue a nowait begin transaction request with an operation code of 419. PurposeThe Unlock operation unlocks on or more records that were previously locked. Parameters
DescriptionTo unlock one multiple type record lock, complete the following steps:
Current PositioningThe unlock does not change positioning information. PurposeThe insert operation, inserts a record into a file. Parameters
DescriptionBtrieve adjust all the key indexes to reflect the key values for the newly inserted record at the time record is inserted. Current PositioningAs follows:
PurposeUpdates an existing record in a Btrieve file. Parameters
DescriptionYour application must retrieve the record to be update by using one of the get operations on the call immediately preceding an update operation. Btrieve then adjusts the key indexes to reflect any change in the key values. It also updates the key buffer parameter if necessary. Current PositioningAs follows:
PurposeRemoves an existing record from a Btrieve file. Parameters
DescriptionTo delete records your application retrieves the record to be deleted on the call immediately preceding the delete operation. Current PositioningAs follows:
PurposeMarks the beginning of a set of logically related Btrieve operations. Parameters
DescriptionDefines the start of a transaction, which can include any number of Btrieve operations on up to twelve different files. Current PositioningA begin transaction has no effect on positioning information.
PurposeCompletes a transaction and makes the appropriate changes to affected data files. Parameters
DescriptionA successful end transaction means that all of the operations bracketed within the transaction have been recorded in your database. The application cannot abort a transaction after the end transaction operation. Current PositioningAn end transaction operation does not affect positioning information.
PurposeRemoves all operations performed since the beginning of an active transaction and terminates the transaction. Parameters
DescriptionAbort transaction removes all operations performed after the start of the previous begin transaction operation, and terminates the current transaction. Current PositioningAn abort transaction operation has no effect on positioning information. PurposeReleases all resources held by a station, such as locks left pending by an abnormal termination of an application. Parameters
DescriptionIf the application is releasing resources for another station on the network, set the key number parameter to -1. Store the connection number of the station to be reset as an integer in the first 2 bytes of the key buffer. Current PositioningThe reset operation destroys all positioning information because it closes any open files.
PurposeThe stop operation terminates Btrieve.EXE and removes it from memory. Parameters
DescriptionIf Btrieve is the highest memory resident program loaded, the stop operation deallocates all the memory previously allocated to Btrieve. The application cannot perform any other Btrieve operations until you restart Btrieve. Current PositioningThe stop operation does not establish a current position. PurposeIt returns the current Btrieve version and revision numbers. Parameters
DescriptionBtrieve returns the data to the data buffer in the following format:
Current PositioningA version operation does not affect current positioning. PurposeThis operation allows to generate a Btrieve file from within your application program. Parameters
DescriptionBtrieve expects the information in the following format: File specs:
Key specs:
Current PositioningA create operation does not establish any positioning information. PurposeRetrieves the characteristics for a specified file. Parameters
DescriptionBtrieve returns the data buffer in the format shown below. File specs:
Key specs:
Current PositioningThe stat operation does not affect positioning. PurposeAssigns an owner name to a file to prevent unauthorized access. Parameters
DescriptionYou must open the file before you can perform a set owner operation. Once set a owner name, it remains in effect until issue a clear owner operation. You cannot issue a set owner operation during a transaction. Possible values for the key number are:
Current PositioningSet owner has no effect on position PurposeRemoves the owner name associated with a Btrieve file. Parameters
DescriptionAfter a clear owner operation, Btrieve no longer requires the owner name. If you previously encrypted the data in the Btrieve file when you assigned the owner, btrieve decripts the data during a clear owner operation. The more data that Btrieve has to decrypt, the longer the clear owner operation takes. Current PositioningClear owner has no effect on positioning.
PurposeThis operation adds a supplemental index to an existing Btrieve file Parameters
DescriptionThe data buffer consist of a 16-byte key specification block for each segment of the supplemental index you are creating. Use the same structure as the key specification block you use in the create operation. Current PositioningThe create supplemental index operation has no effect on positioning.
PurposeRemoves a supplemental index from an existing Btrieve file. Parameters
DescriptionTo drop a supplemental index, the Btrieve file must be open. When Btrieve drops a supplemental index, the file pages that were allocated to that index are placed on a list of free space and are reused when you insert records or create another index. If the file has supplemental indexes with key numbers higher than the index that was dropped, Btrieve decrements those key numbers by one. Current PositioningThe drop supplemental index operation has no effect on positioning. PurposeAllows your application to expand a single Btrieve file to a second logical disk drive. Parameters
DescriptionThe Btrieve file must be opened before it can be extended. It's not possible extend a file during a transaction. If you want Btrieve to begin storing data in the extension file, specify a value of -1 in the key number parameter when you perform the extended operation. Current PositioningThis operation does not affect current operation.
|
| btrv_operations.html |
|
This documentation as well as any accompanying software is an
exclusive property of AR Enterprise Spa ®. It is not allowed to reproduce copy, translate it without express permission. |