# Codes 1xxx

*Advantage Error Guide*

## Contents

- [1001 Open Error](#1001-open-error)
- [1002 Open Error (FPT or DBT)](#1002-open-error-fpt-or-dbt)
- [1003 Open Error (NTX, IDX, or CDX)](#1003-open-error-ntx-idx-or-cdx)
- [1004 Create Error](#1004-create-error)
- [1005 Create Error (creating FPT or DBT)](#1005-create-error-creating-fpt-or-dbt)
- [1006 Create Error (creating NTX, IDX, or CDX)](#1006-create-error-creating-ntx-idx-or-cdx)
- [1010 Read Error](#1010-read-error)
- [1011 Write Error](#1011-write-error)
- [1012 Corruption Detected](#1012-corruption-detected)
- [1020 Data Type Error or Work Area not Indexed](#1020-data-type-error-or-work-area-not-indexed)
- [1021 Data Width Error](#1021-data-width-error)
- [1022 Lock Required](#1022-lock-required)
- [1023 Exclusive Required](#1023-exclusive-required)
- [1024 Append Lock Failed](#1024-append-lock-failed)
- [1025 Write Not Allowed](#1025-write-not-allowed)
- [1026 Data Width Error](#1026-data-width-error)
- [1027 Limit Exceeded](#1027-limit-exceeded)
- [1050 Invalid Order](#1050-invalid-order)
- [1201 Work Area not Indexed](#1201-work-area-not-indexed)

## 1001 Open Error {#1001-open-error}

***Problem:*** The specified table could not be opened.

***Solution:*** Check to make sure that the specified table exists. If the table is not in the same directory as the application, specify the full path name. Verify the application has the necessary rights to access the table. If the table is available only for read access, open as read-only.

## 1002 Open Error (FPT or DBT) {#1002-open-error-fpt-or-dbt}

***Problem:*** The specified memo (FPT or DBT) file could not be opened.

***Solution:*** Check to make sure that the specified file exists. Verify the application has the necessary rights to access the file. If the file is available only for read access, open the file read-only.

## 1003 Open Error (NTX, IDX, or CDX) {#1003-open-error-ntx-idx-or-cdx}

***Problem:*** The specified index (NTX, IDX, or CDX) file could not be opened.

***Solution:*** Check to make sure that the specified file exists. If the file is not in the same directory as the application, specify the full path name. Verify the application has the necessary rights to access the file. If the file is available only for read access, open the file read-only.

## 1004 Create Error {#1004-create-error}

***Problem:*** The specified table could not be created.

***Solution:*** Check to make sure that sufficient disk space and directory entries are available. If the table exists, make sure it is not marked read-only. Verify the application has rights to create the table.

## 1005 Create Error (creating FPT or DBT) {#1005-create-error-creating-fpt-or-dbt}

***Problem:*** The specified memo (FPT or DBT) file could not be created.

***Solution:*** Check to make sure that sufficient disk space and directory entries are available. If the file exists, make sure it is not marked read-only. Verify the application has rights to create the file.

## 1006 Create Error (creating NTX, IDX, or CDX) {#1006-create-error-creating-ntx-idx-or-cdx}

***Problem:*** The specified index (NTX, IDX, or CDX) file could not be created.

***Solution:*** Check to make sure that sufficient disk space and directory entries are available. If the file exists, make sure it is not marked read-only. Verify the application has rights to create the file.

## 1010 Read Error {#1010-read-error}

***Problem:*** A read error occurred on the specified file.

***Solution:*** Make sure the network connection is still valid; check for problems at the server.

## 1011 Write Error {#1011-write-error}

***Problem:*** A write error occurred on the specified file.

***Solution:*** Check to make sure that sufficient disk space and directory entries are available. Make sure the file is not marked read-only. Also, verify the application has the necessary rights to write to the file.

## 1012 Corruption Detected {#1012-corruption-detected}

***Problem:*** File corruption has been detected in the specified file.

***Solution:*** Make sure that the file type is correct for the operation.

## 1020 Data Type Error or Work Area not Indexed {#1020-data-type-error-or-work-area-not-indexed}

***Problem 1:*** An invalid data type was assigned to a field in a table.

***Solution 1:*** Correct the program. If assigning a value to a field in a table from some variable, make sure the variable has been initialized (i.e., is not NIL).

***Problem 2:*** An operation, such as a Seek, was performed in the work area, but there was no index active.

***Solution 2:*** Make sure that an index has been made active before performing the operation.

## 1021 Data Width Error {#1021-data-width-error}

***Problem:*** The value assigned to a numeric FIELD variable could not be accurately represented in the field width specified by the database structure.

***Solution:*** Change the program to suppress invalid values or modify the structure of the table to allow for larger values.

**Note** The default handling for this error is to fill the relevant part of the physical table record with asterisk (*) characters. Subsequent accesses to the field will produce a value of zero until a new value is assigned.

## 1022 Lock Required {#1022-lock-required}

***Problem:*** An attempt was made to update a record in a shared table without first obtaining a lock.

***Solution:*** Correct the program. Obtain a record lock or file lock for the work area before attempting to update a record.

## 1023 Exclusive Required {#1023-exclusive-required}

***Problem:*** The operation being attempted requires exclusive use of the table but the work area was opened for shared access.

***Solution:*** Correct the program. The pack, reindex and zap operations require exclusive access to the table. Also note that adding a tag to a CDX index requires exclusive use of the index.

## 1024 Append Lock Failed {#1024-append-lock-failed}

***Problem:*** A new record could not be appended because a lock could not be obtained for the new record.

***Solution:*** For a shared work area, the append blank operation automatically obtains a record lock for the newly appended record. If the record cannot be locked, the append fails. This generally occurs because another process has obtained a file lock on the table. Change the program to handle the lock contention.

## 1025 Write Not Allowed {#1025-write-not-allowed}

***Problem:*** An attempt was made to update a record in a work area that was opened for read-only access.

***Solution:*** Correct the program. Either suppress operations which update records or open the table for read/write access.

## 1026 Data Width Error {#1026-data-width-error}

***Problem:*** When building an index, the initial evaluation of the key expression (on a blank record) produced a character value of zero length.

***Solution:*** Make sure the key expression will produce a value of the same length for all records. Do not use functions such as TRIM() in the key expression. To restrict the length of the key values, use the LEFT() or PADR() functions.

## 1027 Limit Exceeded {#1027-limit-exceeded}

***Problem:*** Too many indexes were opened for a work area.

***Solution:*** Reduce the number of active indexes for the work area. For each work area, a maximum of 15 indexes can be active at any one time.

## 1050 Invalid Order {#1050-invalid-order}

***Problem***: There was an attempt to set an index to an invalid order.

***Solution***: Make sure that the index order is being set to an order that exists.

## 1201 Work Area not Indexed {#1201-work-area-not-indexed}

***Problem:*** An operation, such as a Seek, was performed in the work area, but there was no index active.

***Solution:*** Make sure that an index has been made active before performing the operation.

*[PO]: Purchase Order  
*[AZA]: local folder
*[(PO]: Purchase Order  
*[RQ]: Requisition  
*[(RQ]: Requisition  
*[RfQ]: Request for Quotation  
*[(RfQ]: Request for Quotation  
*[SO]: Service Order  
*[(SO]: Service Order  
*[SQ]: Service Requisition  
*[(SQ]: Service Requisition  
*[SRfQ]: Service Request for Quotation  
*[OoB]: Open on Board  
*[(OoB]: Open on Board 
*[ART]: Average Running Time (operation hours per day) 
*[MC]: Master Contract
*[ADS]: Advantage Database Server (database engine used in previous versions of the ZeeBORN software)
*[.replic]: file extension for replication files (aka data transfer files)
