User Tools

Site Tools


btrieve_supported_commands_and_attributes.htm
Navigation:  ISAM File Drivers > Btrieve Database Driver >====== Btrieve:Supported Commands and Attributes ====== Previous pageReturn to chapter overviewNext page
File Attributes Supported
CREATE Y
DRIVER(filetype [,driver string]) Y
NAME Y
ENCRYPT Y
OWNER(password) Y1
RECLAIM Y
PRE(prefix) Y
BINDABLE Y
THREAD Y15
EXTERNAL(member) Y
DLL([flag]) Y
OEM Y
File Structures Supported
INDEX Y
KEY Y
MEMO Y2
BLOB N
RECORD Y
Index, Key, Memo Attributes Supported
BINARY Y16
DUP Y
NOCASE Y
OPT Y
PRIMARY Y
NAME Y2
Ascending Components Y
Descending Components Y
Mixed Components Y
Field Attributes Supported
DIM Y
OVER Y
NAME Y
File Procedures Supported
BOF(file) Y10
BUFFER(file) N
BUILD(file) Y3
BUILD(key) Y3
BUILD(index) Y3
BUILD(index, components) Y3
BUILD(index, components, filter) N
BYTES(file) N
CLOSE(file) Y
COPY(file, new file) Y
CREATE(file) Y
DUPLICATE(file) Y
DUPLICATE(key) Y
EMPTY(file) Y
EOF(file) Y10
FLUSH(file) N
LOCK(file) N4
NAME(label) Y
OPEN(file, access mode) Y
PACK(file) Y
POINTER(file) Y11
POINTER(key) Y11
POSITION(file) Y12
POSITION(key) Y12
RECORDS(file) Y
RECORDS(key) Y
REMOVE(file) Y
RENAME(file, new file) Y
SEND(file, message) Y
SHARE(file, access mode) Y
STATUS(file) Y
STREAM(file) Y
UNLOCK(file) N
Record Access Supported
ADD(file) Y5
ADD(file, length) Y5
APPEND(file) Y6
APPEND(file, length) Y5,6
DELETE(file) Y7
GET(file,key) Y
GET(file, filepointer) Y
GET(file, filepointer, length) N
GET(key, keypointer) Y
HOLD(file) Y
NEXT(file) Y
NOMEMO(file) Y
PREVIOUS(file) Y
PUT(file) Y5
PUT(file, filepointer) N
PUT(file, filepointer, length) Y
RELEASE(file) Y
REGET(file,string) Y
REGET(key,string) Y
RESET(file,string) Y
RESET(key,string) Y
SET(file) Y
SET(file, key) Y
SET(file, filepointer) Y8
SET(key) Y
SET(key, key) Y
SET(key, keypointer) Y8
SET(key, key, filepointer) Y9
SKIP(file, count) Y
WATCH(file) Y
Transaction Processing Supported
LOGOUT(timeout, file, …, file) Y13,14
COMMIT Y14
ROLLBACK Y
Null Data Processing Supported
NULL(field) N
SETNULL(field) N
SETNULL(file,field) N
SETNONNULL(field) N

Notes

1      We recommend using a variable password that is lengthy and contains special characters because this more effectively hides the password value from anyone looking for it. For example, a password like “dd….#$…*&” is much more difficult to “find” than a password like “SALARY.”

TipBox.jpg

To specify a variable instead of the actual password in the Owner Name field of the File Properties dialog, type an exclamation point (!) followed by the variable name. For example: !MyPassword.

2      The driver ignores any NAME attribute on a MEMO field. MEMO fields can reside either in a separate file, or in the data file if the driver string /MEMO is set to SINGLE, LVAR or NOTE. If the driver string /MEMO is not set, the separate MEMO file name is “MEM,” preceded by the first five characters of the file's label, plus the file extension “.DAT.” Setting the driver string /MEMO restricts you to one memo field per file.

3      If used after an APPEND(), but before a file is closed, this adds the keys dropped by APPEND(). In all other cases BUILD() rebuilds the file and keys. If you only want to rebuild keys, doing a BUILD(key) for each key is faster than BUILD(file).

4      Btrieve does not directly support file locking. If you require file locking, use LOGOUT.

5      When using the LVAR and NOTE memo type, make certain that the memo has the appropriate structure. If the structure is incorrect and the driver calculates a length greater than the maximum memo size defined for that file, these functions fail and set errorcode to 57 - Invalid Memo File.

6      Btrieve does not support non-key updates. To emulate APPEND() behavior, the driver drops all indexes possible when APPEND() is first called. Calling BUILD() immediately after appending records rebuilds the dropped key fields.

7      Btrieve's DELETE destroys positioning information when processing in file order. The driver attempts to reposition to the appropriate record. This is not always possible and may require the driver to read from the start of the file. Using key order processing avoids this possible slow down.

8      If a file pointer or key pointer has a value of zero, the driver ignores the pointer parameter. Processing is set to either file or key order, and the record pointer is set to the first element.

9      If the file pointer has a value of zero, processing starts at the first key value whose position is greater than (or less than for PREVIOUS) the file pointer. Not passing a valid pointer, other than maximum LONG or maximum ULONG, is inefficient.

10     These functions are supported, but not recommended. They cause more disk I/O than ERRORCODE(). Btrieve returns eof when reading past the last record. Therefore, the driver must read the next record, then the next to see if it's at the end of file, then return to the record you want.

11     POINTER() returns a relative position within the file, not a record number.

12     POSITION(file) returns a STRING(4). POSITION(key) returns a STRING the size of the key fields + 4 bytes.

13     If a system crashes during a transaction (LOGOUT–COMMIT), the recovery is automatically handled by the Btrieve driver the next time the affected file is accessed.

When you issue a LOGOUT, all Btrieve files accessed during the transaction are logged out. The following code is illegal because you cannot close a logged-out file:

 LOGOUT(1,file1)

 OPEN(file1)

 CLOSE(file1)

14     See also PROP:Logout in the Language Reference.

15     THREADed files do not consume additional file handles for each thread that accesses the file.

16     OEM conversion is not applied to BINARY MEMOs. The driver assumes BINARY MEMOs are zero padded; otherwise, space padded.

btrieve_supported_commands_and_attributes.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1