Btrieve Status Codes
Shop Trac uses the Btrieve® database engine.
Btrieve can return over
200 different status codes. Many of these are intercepted
by the actual software, but some of them may return a
status code and/or an error message to the user. In some
cases this message is for information only (such as
adding a duplicate record to a database that does NOT
allow duplicates), but in some cases this may indicate
that an error situation exists. The following list of
Btrieve Status Codes should be a valuable resource in
solving many of these error conditions.
Status 0 - Operation Successful
The last Btrieve operation was successful.
Status 1 - Invalid Operation
Invalid operation.
Status 2 - Disk I/O Error
An error occurred during disk read/write. This status
code in the file has been damaged and must be recreated,
or that the file on the open call was not created by
Btrieve. This status code also occurs if the application
passed an invalid position block or if a Btrieve file
created in version 6.0 format is opened by a 5.x version
of Btrieve
Status 3 - File Not Open
The operation cannot be executed because the file is not
open. A successful Open operation must be performed
before Btrieve can process any other operations. This
status code also occurs if the application passed an
invalid position block for the file.
Status 4 - Key Value Not Found
The specified key value in the index path was not found.
Status 5 - Duplicate Key Value
A record with a key field containing a duplicate key
value cannot be added to an index that does not allow
duplicate values.
Status 6 Invalid Key Number
The key number was not valid for the file being accessed.
Status 7 - Different Key Number
The key number was changed before a Get Next, Get
Previous, Update, or Delete operation. The operation
specified requires the same value be assigned to the key
number as the previous operation because Btrieve uses
positioning information relative to the previous key
number.
Status 8 - Invalid Positioning
Positioning within a Btrieve file must be established by
getting a current record prior to updating or deleting a
record, or before attempting to move to the next or
previous record within a file. This status also occur if
the application passed an invalid position block for the
file.
Status 9 - End-Of-File
The operation tried to read past the end of file
Status 10 - Modifiable Index Value Error
The operation tried to modify an index which is defined
as non-modifiable.
Status 11 - Invalid Location
The filename specified for the Table Location has a
defined file location which is not a valid DOS filename.
Status 12 - File Not Found
The filename specified for the Table Location could not
be found.
Status 13 - Extended File Error
Btrieve could not find the extension file for an extended
file which the application tried to open. Extension files
must be loaded on the logical disk drive specified when
the extension was created. Both the primary file and its
extension file must be On-Line to access an extended
file. The Btrieve NLM does not support extended files.
Status 14 - Pre-Image Open Error
(For versions of Btrieve prior to 6.0) The pre-image file
could not be created or opened. There are three possible
causes for this error.
- Btrieve could not create a new pre-image file because
your disk directory is full. Btrieve must be able to
create a pre-image file
- Btrieve could not open the pre-image file to restore
file integrity of the pre-image file that was erased or
damaged, Btrieve cannot restore the file's integrity. In
this case, either use BUTIL -RECOVER to retrieve the
damaged file's data records in a sequential file, or
replace the most recent backup.
- Btrieve could not assign a handle to the pre-image file
because the NetWare Btrieve Record Manager was not
started by a user with access rights to the pre-image
file.
Status 15 - Pre-Image I/O Error
(For versions of Btrieve prior to 6.0) An I/O error
occurred during the pre-imaging function. Either the disk
is full or the pre-image damaged.
Status 17 - Close Error
An error occurred while writing the directory structure
to disk prior to closing the file. Either Btrieve could
not close the file, or a new page was added to the file
and Btrieve could not close and reopen the file to update
the directory structure. Check for a disk hardware
failure. This status code also occurs if the application
passes an invalid position block for the file.
Status 18 - Disk Full
The disk is full and the file could not be expanded to
accommodate the insertion. Erase any unnecessary files to
gain additional disk space. This status may also be
returned by NetWare Btrieve if NetWare security will not
allow Btrieve to expand the file, usually because the
user who created the file no longer has rights to expand
it.
Status 19 - Unrecoverable Error
An unrecoverable error has occurred. File integrity
cannot be ensured.
Status 20 - Record Manager Inactive
The operation was not processed because BREQUEST or the
NetWare Btrieve Record Manager was not loaded. This
status may also occur if you attempt to access a Btrieve
file on a local hard disk using the requester version of
WBTRCALL.DLL.
Status 21 - Index Buffer Too Short
The Index Buffer was not long enough to accommodate the
key field for the index path requested. Verify that the
indexes in the DDF definition are exactly like the status
of the file.
Status 22 - Data Buffer Length
The Data Buffer length was not long enough to accommodate
the length of the data record defined when the file was
created. Verify that the sum of the sizes of all fields
in the DDF is exactly equal to the record length of the
file reported by the View - Table Status menu.
- For Get or Step operations, if the data buffer is too
short to contain the fixed length portion of the record,
Btrieve does not return any data to the data buffer. If
the record is a variable length record and the data
buffer is too short to contain the entire variable length
portion of the record, Btrieve returns as much data as it
can and a status code 22, indicating that it could not
return the entire record.
- For the Insert operation, Btrieve does not insert the
record if the data buffer is shorter than the fixed
length portion of the record.
- For the Update operation, if the data buffer is too
short to contain the fixed length portion of any record,
Btrieve does not update the record.
- For the Stat operation, this status indicates that the
data buffer is not long enough to contain all the file
and key specifications, and the alternate collating
sequence definition, if specified.
Status 23 - Position Block Length
The Position Block control was not 128 bytes long,
Status 24 - Page Size Error
The page size was invalid. The page size must be a
multiple of 512 bytes but must be no larger than 4096
bytes. This status also occurs if you attempt to open a
Btrieve file that has a page size larger than the /p
option for Btrieve in the NOVDB.INI file.
Status 25 - Create I/O Error
The file could not be created. Possible causes are a full
disk directory or a full disk. If you are creating a file
over an existing file, Btrieve returns a status code 25
if the existing file is open or flagged transactional.
A Status 25 may also be returned in you attempt to create
a set off DDF in the same directory as the current,
active DDF's.
Status 26 - Number of Keys
The number of keys specified for the create was invalid.
You must define at least one key without the null
attribute.
- For Btrieve version 5.x and below, files with a page
size of 512 bytes the number of the key segments must be
between 1 and 8. For larger page sizes, the number of key
segments must be between 1 and 24.
-For Btrieve version 6.0, see the developer's kit for the
number of keys available for different page sizes.
Status 27 - Invalid Key Position
The key field position specified exceeded the defined
record length for the file. Either the key position was
greater than the record length or the key position plus
the key length exceeded the record length. For key-only
files, the key must begin in the first byte of the record
(position 1).
Status 28 - Invalid Record Length
The record length was invalid. The record length
specified (plus overhead for duplicates) must be less
than or equal to the page minus 6 or greater than or
equal to four bytes long. The key length was invalid. The
key length specified must be greater than zero and cannot
exceed 255.
Status 29 - Invalid Key Length
The length of a binary key must be even. Btrieve requires
that each key page in the file is large enough to hold at
least eight keys. If the page size is too small to
accommodate eight occurrences of the specified key length
(plus overhead), either increase the file's page size or
decrease the key length.
Status 30 - Not A Btrieve File
The filename specified is not a valid Btrieve file.
Either the file was not created by Btrieve, or it was
created by an earlier version of Btrieve. Another
possibility is that the first page of the file, which
contains the File Control Record, is damaged.
Status 35 - Directory Error
The directory portion of the File Location for the
associated file from the FILE.DDF is not valid.
Status 36 - Transaction Error
A begin Transaction operation could not be performed
because no transactions were specified when the NetWare
Btrieve Record Manager was initialized or the settings in
the NOVDB.INI file do not accommodate transactions.
Status 37 - Transaction Is Active
A Begin Transaction was issued while another transaction
was active at that station. Transactions cannot be
nested.
Status 38 - Transaction Control File I/O Error
An error occurred when Btrieve tried to write to the
transaction control file. Possible causes were that the
disk was full, the disk was write- protected, or the
transaction control file (which was created when the
NetWare Btrieve Record Manager was loaded or the DLL was
initialized) was deleted.
Status 39 - End/Abort Transaction Error
An End or Abort Transaction operation was issued without
a corresponding Begin Transaction operation.
Status 40 - Transaction Max Files
The application tried to update more than the maximum
number of files allowed within a transaction. The maximum
number of different files that can be updated during a
logical transaction is set when the NetWare Btrieve
Record Manager is configured or is set in the NOVDB.INI.
Refer to the Btrieve Installation and Operations manual
for more information on the initialization parameters.
Status 41 - Operation Not Allowed
The application tried to perform an operation that is not
allowed at this time. Some operations are not allowed
under certain operating conditions. For example, Btrieve
version 5.x returns this status code if you attempt to
perform a Step, Update, or Delete operation on a key-only
file or a Get operation on a data only file. During a
transaction you can only open files in Read-only mode.
Status 43 - Invalid Record Access
The record address specified in the VA Position property
for a Get Direct operation was invalid. The VA Position
property is set on a Get Position operation. The address
is outside of the file's boundaries; it is not on a
record boundary within a data page, or on a data page.
The 4-byte address you specify for a Get Direct operation
should be one that was obtained by a Get Position
operation.
Status 44 - Null Index Path
The application tried to use the Get Direct operation to
establish an index path for a key whose value is null in
the corresponding record. Btrieve cannot establish
positioning based on a null key value.
Status 46 - Access To File Denied
Owner name required for updates was not specified
correctly when the file was opened.
Status 51 - Invalid Owner
The file you tried to open has an owner name assigned to
it. You must supply the correct owner name to open the
file.
Status 52 - Error Writing Cache
While trying to make a cache buffer available, Btrieve
tried to write data to a logical disk drive from a file
that was previously opened in accelerated mode. An I/O
error occurred during a write.
Status 54 - Variable Page Error During a Step
Direct operation, Btrieve could not read all or part of
the variable length portion of a record. In this case,
Btrieve returns as much data as possible to the data
buffer. This error usually indicates file damage to one
or more pages in the file.
Status 55 - Auto increment Error
The application tried to specify either the segmented or
duplicate attribute for an Auto Increment key type. An
Auto Increment key cannot be part of another key and
cannot allow duplicates.
Status 58 - Compression Buffer Too Short
The application tried to read or write a record that is
longer than the value specified for the size of the
compression buffer. Reconfigure the NetWare Btrieve
Record Manager, specifying a higher value for the
"Maximum Compressed Record Size" option or
change this value in the NOVDB.INI file.
Status 66 - Maximum Number of Open Databases
Exceeded
The application has tried to open too many SQL databases
configured for referential integrity checking at one
time. The maximum number of databases that can be opened
concurrently for referential integrity checking is a
configurable startup option for Btrieve, The default is
set to 20. Refer to your NetWare SQL documentation for
more information on referential integrity.
Status 67 - Rl Could Not Open SQL Data Dictionaries
This status code may indicate that an application opened
a data containing referential integrity definitions but
Btrieve cannot open one of the NetWare SQL data
dictionary files (FILE.DDF or RELATE.DDF) or the
configuration file (DBNAMES.CFG).
Be sure that DBNAMES.CFG is present in the SYS:SYSTEM
directory and that the FILE.DDF and RELATE.DDF files for
that named database are placed in the dictionary location
that the Setup utility defines. Refer to your NetWare SQL
documentation for more information on referential
integrity .
Status 68 - Rl Cascades Too Deeply
Btrieve cannot enforce the Delete Cascade rule on a file
under referential integrity control because the record
that the application attempted to delete has more than 16
levels of dependents0 Delete records from the lower
levels, and then try again to delete the record that the
application was attempting to delete initially. Refer to
your NetWare SQL documentation for more information on
referential integrity.
Status 69 - Rl Cascade Error
The application incurred an error while Btrieve was
attempting to enforce the Delete Cascade rule in response
to a Delete operation. This status code indicates that
the related file has been damaged and must be recreated.
Refer to your NetWare SQL documentation for more
information on referential integrity and the Delete
Cascade rule.
Status 71 - Rl Definitions Violation
If you have attempted an Insert operation, a foreign key
value in the record to be inserted does not have a
corresponding primary key in the referenced file.
If you are performing an Update operation, there are two
possible causes for this status code:
- You are attempting to change the value of a primary
key.
- You are attempting to change the value of a foreign key
to a value that does not exist for the defined primary
key.
If you have attempted a Delete operation, the Restrict
rule is being enforced, and a primary key value in the
record you are trying to delete references a foreign key
in the referenced file. Refer to your NetWare SQL
documentation for more information on referential
integrity.
Status 72 - Rl Referenced File Could Not Be Opened
The referenced file cannot be found at the location that
FILE.DDF and DBNAMES.CFG specify. This status code is
returned only on a first attempt to delete or insert in a
file under referential integrity control, or on a first
attempt to update when the operation could change a
foreign key in the specified file.
Status 73 - Rl Definition Out Of Sync
You have attempted to open a file for which the
referential integrity definition either disagrees with
the definition in RELATE.DDF or refers to a database not
found in DBNAMES.CFG. This status code can also occur on
an Insert or Delete operation, or an Update operation
that would change a foreign key.
Run the NetWare SQL RIUTIL utility, and use the CHECK
command For more information on the RIUTIL utility and on
referential integrity refer to your NetWare SQL
documentation.
Status 76 - Rl Referenced File Conflict
The application has attempted to perform an Update,
Insert, or Delete operation on a file that references
another file. That application cannot open the referenced
file for referential integrity checking because it is
already opened in Exclusive mode. Wait until the
referenced file is closed or is opened in a mode other
than Exclusive, and then retry the operation. Refer to
your NetWare SQL documentation for more information on
referential integrity.
Status 77 - Wait Error
Either a wait lock bias is specified for an operation but
another user has locked the requested source, or the
application is currently processing a wait transaction
and tried to access a file that another user has locked.
When you are using the Btrieve Requester to access
Btrieve, the Requester waits and retries if a requested
resource is locked. When a server-based application, such
as NetWare SQL, is accessing Btrieve and the requested
source is locked, a wait is also required. In this case,
Btrieve would be expected to perform the wait. Since this
would occupy Btrieve and lock out other users who might
be trying to release the requested source, Btrieve does
not perform the wait. Instead, it returns a status code
77, and the server-based application must retry later.
Status 78 - Deadlock Detected
Btrieve detected a deadlock condition. The application
should clear all resources (such as aborting or ending
the transaction or releasing all record locks) before
proceeding. This allows the other applications to access
the resources for which they are waiting.
Status 79 - Programming Error
It is possible to receive this status code when there is
a malfunction that Btrieve cannot specifically detect or
from which Btrieve cannot recover. Retry the operation
again. If the error persists, there may be a system
corruption; try to clear the system by rebooting, and
then try the operation again.
Status 80 - Conflict
The Update or Delete operation could not be performed
because the record was changed by another application
since your application read the record. Reread the record
prior to rescinding an Update or Delete operation.
Status 81 - Lock Error
This error can result from any one of three conditions. -
The Btrieve lock table was full. Decrease the number of
locks that your application uses or re configure the
NetWare Btrieve Record Manager and specify a higher value
for the "Maximum Number of Record Locks"
option.
- The lock function call to NetWare failed
- The application tried to unlock one record that was
locked with a multiple record lock, and the record
position stored in the data buffer did not correspond
with any record that was locked in that file.
Status 82 - Lost Position
When performing a Get Next or Get Previous on a key with
duplicates, the application tried to retrieve a record
that was deleted or whose key value was modified by
another application. Re-establish positioning using a Get
Equal or a Get Direct operation.
Status 83 - Read Outside Transaction
The application tried to delete or update a record within
a transaction, but the record was not read within the
transaction. If you are going to update or delete a
record within a transaction, you must read the record
within the transaction to ensure you have first obtained
exclusive access to the data.
Status 84 - Record In Use
The application tried to lock a record that was currently
locked by another application, or the application tried
to access a file within a transaction while another
application held active record locks in that file.
Status 85 - File In Use
The application tried to either open a file, access a
record in a transaction, or lock a record while another
application was accessing the file within a transaction.
If this condition occurs, your application should apply
either of the following methods:
- Retry the operation until it is successful. Under light
to moderate network use, this may be the simplest and
quickest solution.
- Use wait locks (+100) instead of no-wait locks. The
application which encounters the locked header page will
experience a momentary delay until the lock on the header
page is released.
Status 86 - File Table Full
Btrieve's file table was full. Re configure the NetWare
Btrieve Record Manager or the NOVDB.INI file and specify
a higher value for the "Maximum Number of Open
Files" option.
Status 87 - Handle Table Full
Btrieve's handle table was full. Re configure the NetWare
Btrieve Record Manager or the NOVDB.INI file and specify
a higher value for the "Maximum Number of Open
Files" option
Status 88 - Incompatible Mode Error
The application tried to open a file in an incompatible
mode. If the first application to access to a file opens
it in accelerated mode, all other applications must open
it in accelerated mode. If the first application to
access a file opens it in non-acce0erated mode, other
applications cannot open the file in accelerated mode.
Status 90 - Redirected Device Table Full
Brequest's redirection table or server routing table was
full. This occurs if you attach to additional servers or
map to additional drives after you loaded BREQUEST.
Reload BREQUEST, specifying a large number for the
"Number of File Servers" or "Number of
Mapped Drives" options (/S and /R respectively).
This error also occurs if you detach a particular sen0er
and attach a different server. Once a workstation has
attached to a server, BREQUEST will not remove its name
from the server routing table.
Status 91 - Server Error
BREQUEST could not establish a session with the server.
Either the NetWare Btrieve Record Manager has not been
started or the server was not active. Verify that the
NetWare Btrieve Record Manager is active on the server in
question.
Status 92 - Transaction Table Full
The maximum number of active transactions was exceeded.
Reconfigure the NetWare Btrieve Record Manager and
specify a higher value for the "Number of Concurrent
Transactions" option.
Status 93 - Incompatible Lock Type
Your application tried to mix single record locks
(+100/+200) and multiple record locks (+300/+400) in the
same file at the same time. All locks of one type must be
released before a lock of the other type can be executed.
Status 94 - Permission Error
Your application tried to open or create a file in a
directory without the proper privileges. Btrieve does not
override the network privileges assigned to users.
Status 95 - Session No Longer Valid
The previously established session was no longer active
due to an error at the workstation, the file server, or
on the network. Verify that your workstation is still
attached to the file server and then reload BREQUEST.
Status 96 - Communications Environment Error
The SPX connection table is full. Reload SPX, specifying
a higher value for the connection table. Refer to the
NetWare system documentation for more information.
Status 97 - Data Message Too Small
Your application tried to read or write a record which
was no longer than the NetWare Btrieve Record Manager or
BREQUEST could handle. Reconfigure the NetWare Btrieve
Record Manager and specify a higher value for the
"Maximum Record Length" option. Reload BREQUEST
and specify a higher value for the /D option.
- For an Update, Insert, or Create operation, the
application receives this error if the data buffer length
it specifies for the record exceeds the length specified
for NetWare Btrieve Record Manager or BSERVER.
- For a Get, Step, or Stat operation, the application
receives this error if the value specified for the data
buffer length is shorter than the length of the data
Btrieve would return, regardless of the data buffer
length specified in the program.
Status 98 - Internal Transaction Error
An error occurred during an operation without a
transaction on a TTS file. AII Insert, Update, and Delete
operations since the last Begin Transaction operation
have been rolled back. You should issue an Abort
Transaction operation (operation 21) to complete the
rollback and the transaction.
Status 100 - No Cache Buffers Available
Btrieve has used all the cache buffers it allocated at
load time. Using the Setup utility, you can increase the
value for the Cache Allocation configuration option.
Alternatively, you can change the Number of remote
Sessions configuration option to decrease the number of
concurrent Btrieve users. For more information, refer to
chapter 3, "Installing and Configuring Btrieve"
in your Btrieve Installation and Operation manual.
Status 101 - No OS Memory Available
There is not enough operating system memory available to
perform the requested operation. Decrease the value for
the Cache Allocation configuration option (using the
Setup utility), decrease the number of concurrent Btrieve
users (using the Number of Remote Sessions configuration
option in the Setup utility), or add memory to the
server. For more information on the Configuration
options, refer to Chapter 3, "Installing and
Configuring Btrieve", in your Btrieve Installation
and Operation manual.
Status 102 - Not Enough Stack space
Btrieve has run out of stack space. To increase the
amount of stack space available to your application
relink the application, setting the stack size to a
higher value. Only the NLM applications calling Btrieve
on the local server get this message.
Status 1001 - Lock Option Out Of Range
The number specified for the Multiple Lock configuration
option must be between 1 and 255, inclusive.
Status 1002 - Memory Allocation Error
Btrieve is unable to allocate the amount of memory
needed. Make sure that the workstation has enough memory
to load all the programs it requires.
Status 1003 - Memory Option Too Small
Make sure the value for the Memory Size configuration
option in the NOVDB.INI file is large enough to
accommodate the required cache size.
Status 1004 - Page Size Option Out Of Range
The value of the page size configuration option in the
NOVDB.INI file must be an even multiple of 512, and it
must be between 512 and 4096 inclusive.
Status 1005 - Invalid Pre-Image Drive Option
You must specify a valid drive letter for the pre-image
File Drive configuration option in the NOVDB.INI file.
NOTE: Pre-image files are used only for files created by
Btrieve versions earlier than v6.x, or by v6.x if it was
loaded with the Create Btrieve Files in Previous 6.x
Format configuration option in the NOVDB.IN file set to
Yes.
Status 1007 - Files Option Out of Range
The Open Files configuration option in the NOVDB.INI file
must be between 1 and 255, inclusive.
Status 1008 - Invalid Initialization Option
A configuration option you specified in the NOVDB.INI
file contains invalid or unidentifiable values. For more
information on configuration options, refer to the
installation and operation manual for Btrieve for
Windows.
Status 1009 - Invalid Transaction File Open
The filename specified for the Transaction filename
configuration option in the NOVDB.INI file in not valid.
Check to make sure that the transaction filename is
correct.
Status 1011 - Compression Buffer Out Of Range
The Compression Buffer Size configuration in the
NOVDB.INI must be between 1 and 64, inclusive.
Status 1013 - Task Table Full
The Btrieve DDL may return this status code if the task
entry table is full. You can remedy this situation by
increasing the number of available task entries; use the
task initialization option (tasks =xxx) under the
[Btrieve] or [BREQUESTDPM] headings in NOVDB.INI file.
The minimum value for this option is 1 ; the maximum
value is 255.
Status 1014 - Stop Warning
The Btrieve DLL returns this status code if the
application still has open files or an active transaction
when Smithware Controls for Btrieve is ended.
Status 1015 - Invalid Pointer
A pointer parameters passed into Btrieve is invalid
Status 1016 - Already Initialized
The Btrieve DDL may return this status code if an attempt
is made to initialize Btrieve when it is already
initialized.
Status 2001 - Insufficient Memory
Reduce the value specified for the /D configuration
option in the NOVDB.INl file.
Status 2003 - No Local Access Allowed
The application attempted to access a file stored on a
local drive. The version of WBTRCALL.DLL installed at the
workstation does not allow access to local files.
Status 2006 - No Available SPX Connection
SPX has already established the maximum number of
sessions it can handle. To increase the maximum, edit the
NET.CFG file. Refer to your NetWare documentation for
more information on NET.CFG.
Status 2007 - Invalid Parameter
One of the pointer parameters passed to Btrieve is
invalid. Check program to ensure that the pointer
parameters are correct.