_BtCreate() Function
<< Click to Display Table of Contents >>
_BtCreate() Function
|
|
Purpose
Create a btrieve file
Prototype
FUNCTION _BtCreate ( ptrBuffer AS PTR, nBufLen AS WORD, cName AS STRING, lOverWrite AS LOGIC, nid := 0 AS WORD ) AS LOGIC
Argument(s)
<ptrBuffer> | Pointer to the definition structure of the file |
<nBufLen> | Length of the definition structure |
<cName> | Name of the file to create |
<lOverwrite> | If the file exists, is it allowed to overwrite the file |
<nId> | (Optional) Client ID to use when creating the file. |
Return
LOGIC | Is the file Created successfully? |
Description
With this function you can create a Btrieve file. To describe the file you need to fill a strFileSpec structure and the strKeySpec structures that are part of the strFileSpec structure.
When an error occurs creating the file, the return value is FALSE and the Bt_Error() function returns one of the following values:
02 | I/O Error |
18 | Disk Full |
22 | Data Buffer Length |
24 | Page Size Error |
25 | Create I/O Error |
26 | Number of Keys |
27 | Invalid Key Position |
28 | Invalid Record Length |
29 | Invalid Key Length |
48 | Invalid Alternate Sequence Definition |
49 | Key Type Error |
59 | File Already Exists |
104 | Locale Not Found |
105 | Cannot Create with VAT |
See Also
strFileSpec, strKeySpec, _BtCreateIndex()