_BtCreate() Function

 

<< Click to Display Table of Contents >>

Navigation:  Low Level Functions >

 

_BtCreate() Function

 

Previous pageReturn to chapter overviewNext page

 

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

 

 

LOGICIs 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:

 

02I/O Error
18Disk Full
22Data Buffer Length
24Page Size Error
25Create I/O Error
26Number of Keys
27Invalid Key Position
28Invalid Record Length
29Invalid Key Length
48Invalid Alternate Sequence Definition
49Key Type Error
59File Already Exists
104Locale Not Found
105Cannot Create with VAT

 

 

 

See Also

 

 

strFileSpec, strKeySpec, _BtCreateIndex()