CodeBase Database Errors

The following error codes that are returned by the EBMS CodeBase database engine when an error has occurred. The tables display the integer constants and the corresponding small error descriptions accompanied by a more detailed explanation.

Constant Name

Value

Meaning

e4close

-10

Closing File

An error occurred while attempting to close a file.

e4create

-20

Creating File

This error could be caused by specifying an illegal file name, attempting to create a file that is open, having a full directory, or by having a disk problem.

 

Refer to the Code4::safety and Code4::errCreate flags in the Code4 chapter of this manual for more information on how to prevent this error from occurring. 

 

This error also results when the operating system doesn't have enough file handles. See e4numFiles, below, for more information. 

e4len

-30

Determining File Length

An error occurred while attempting to determine the length of a file. This error occurs when CodeBase runs out of valid file handles. See e4numFiles, below, for more information.

e4lenSet

-40

Setting File Length

An error occurred while setting the length of a file. This error occurs when an application does not have write access to the file or is out of disk space.

e4lock

-50

Locking File

An error occurred while trying to lock a file. Generally this error occurs when the Code4::lockEnforce member variable is set to true (non-zero) and an attempt is made to modify an unlocked record. This error can also occur when File4::lock is called more than once for the same set of bytes without calling File4::unlock between the calls toFile4::lock.

e4open

-60

Opening File

A general file failure occurred opening a file. This error will be generated if there is not enough information to generate any of theÔÇæ6x errors listed below (i.e. the compiler or operating system does not allow for distinguishing between various file errors).

e4permiss

-61

Permission Error Opening File

Permission to open the file as specified was denied. For example, another user has the file opened exclusively.

e4access

-62

Access Error Opening File

Invalid open mode was specified. This would usually occur if there was a discrepancy between CodeBase and the implementation on a compiler or operating system (i.e. a compatibility problem).

e4numFiles

-63

File Handle Count Overflow Error Opening File

The maximum file handle count was exceeded.

 

 

The number of file handles available to an application or DLL is determined in the 'startup' code of the 'C' run-time library that the application or DLL is linked with.

 

The pre-built CodeBase DLL uses the multi-thread run-time libary, which supports up to 256 file handles.

 

 

The server executable has been built with modified run-time libraries that support up to 255 file handles being available. Therefore, this error is unlikely to occur in client-server applications, where the server is opening all files. If this error does occur in a client-server application, you must modify your application to use less files at any given time. 

e4fileFind

-64

File Find Error Opening File

File was not found as specified.

e4instance

-69

Duplicate Instance Found Error Opening File

An attempt to open a duplicate instance of a file has been denied. The Code4::singleOpen setting influences how duplicate accessing of a file from within the same executable is performed. This error indicates one of two possibilities:

1.      An open request has occurred but an active data handle in the same executable is inhibiting the open.

 

 

2.    In a client-server configuration, a different client application has explicitly requested and has been granted exclusive client-access to the specified file. 

e4read

-70

Reading File

An error occurred while reading a file. This could be caused by calling Data4::go with a nonexistent record number.

e4remove

-80

Removing File

An error occurred while attempting to remove a file. This error will occur when the file is opened by another user or the current process, and an attempt is made to remove that file.

e4rename

-90

Renaming File

An error occurred while renaming a file. This error can be caused when the file name already exists.

e4unlock

-110

Unlocking File

An error occurred while unlocking part of a file. This error can occur when an attempt is made to unlock bytes that were not lockedwith File4::lock.

e4write

-120

Writing to File

This error can occur when the disk is full.

Data File Specific Errors

Constant Name

Value

Meaning

e4data

-200

File Is Not a Data File

This error occurs when attempting to open a file as a .DBF data file when the file is not actually a true data file. If the file is a data file, its header and possibly its data are corrupted.

e4fieldName

-210

Unrecognized Field Name

A function, such as Data4::field, was called with a field name not present in the data file.

e4fieldType

-220

Unrecognized Field Type

A data field had an unrecognized field type. The field type of each field is specified in the data file header.

e4recordLen

-230

Record Length Too Large

The total record length is too large. The maximum is USHRT_MAX-1, which is 65534 for most compilers.

e4append

-240

Record Append Attempt Past End of File

e4seek

-250

Seeking

This error can occur if Data4::seek(double) tries to do a seek on a non-numeric tag.

Index File Specific Errors

Constant Name

Value

Meaning

e4entry

-300

Tag Entry Missing

A tag entry was not located. This error occurs when a key, corresponding to a data file record, should be in a tag but is not.

e4index

-310

Not a Correct Index File

This error indicates that a file specified as an index file is not a true index file. Some internal index file inconsistency was detected.

e4tagName

-330

Tag Name Not Found

The tag name specified is not an actual tag name. Make sure the name is correct and that the corresponding index file is open.

e4unique

-340

Unique Key Error

An attempt was made to add a record or create an index file that would have resulted in a duplicate tag key for a unique key tag. In addition, Tag4::unique returned e4unique, or when creating an index file, thememberTAG4INFO::unique specified e4unique.

e4tagInfo

-350

Tag information Is Invalid

Usually occurs when calling Data4::create orIndex4::create with invalid information in the input TAG4INFO structure.

Expression Evaluation Errors

Constant Name

Value

Meaning

e4commaExpected

-400

Comma or Bracket Expected

A comma or a right bracket was expected but there was none. For example, the expression "SUBSTR( A" would cause this error because a comma would be expected after the 'A'.

e4complete

-410

Expression Not Complete

The expression was not complete. For example, the expression "FIELD_A +" would not be complete because there should be something else after the '+'.

e4dataName

-420

Data File Name Not Located

A data file name was specified but the data file was not currently open. For example, if the expression was "DATA->FIELD_NAME", but no currently opened data file has "DATA" as its alias. Refer toData4::alias.

e4lengthErr

-422

IIF() Needs Parameters of Same Length

The second and third parameters of database function IIF() must resolve to exactly the same length. For example, IIF( .T., "12", "123" ) would return this error because character expression "12" is of length two and "123" is of length three.

e4notConstant

-425

SUBSTR() and STR() Need Constant Parameters

The second and third parameters of functions SUBSTR() and STR() require constant parameters. For example, SUBSTR( "123", 1, 2 ) is fine; however, SUBSTR( "123", 1, FLD_NAME ) is not because FLD_NAME is not a constant.

e4numParms

-430

Number of Parameters Is Wrong

The number of parameters specified in a database expression is wrong.

e4overflow

-440

Overflow While Evaluating Expression

The database expression was too long or complex for CodeBase to handle.

The parsing algorithm limits the number of comparisons made in a query. Thus, very long expressions can not be parsed. UseCode4::calcCreate to 'shorten' the expression.

e4rightMissing

-450

Right Bracket Missing

The database expression is missing a right bracket. Make sure the expression contains the same number of right as left brackets.

e4typeSub

-460

Sub-expression Type Is Wrong

The type of a sub-expression did not match the type of an expression operator. For example, in the expression "33 .AND. .F.", the "33" is of type Numeric and the operator ".AND." needs Logical operands.

e4unrecFunction

-470

Unrecognized Function

A specified function was not recognized. For example, the expression "SIMPLE(3)" is not valid.

e4unrecOperator

-480

Unrecognized Operator

A specified operator was not recognized. For example, in the database expression "3 } 7", the character '}' is in a place where a database operator would be expected.

e4unrecValue

-490

Unrecognized Value

A character sequence was not recognized as a database constant, field name, or function.

Could be an bad validation in security. Try a user with different permissions. Check the Advanced Security

e4unterminated

-500

Unterminated String

According to database expression syntax, a string constant starts with a quote character and ends with the same quote character. However, there was no ending quote character to match a starting quote character.

e4tagExpr

-510

Expression Invalid for Tag

The expression is invalid for use within a tag. For example, although expressions may refer to data aliases, tag expressions may not. This error usually occurs when specifying TAG4INFO expressions when callingData4::create or Index4::create and the TAG4INFOcontains an invalid key or filter expression.

Optimization Errors

Constant Name

Value

Meaning

e4opt

-610

Optimization Error

A general CodeBase optimization error was discovered.

e4optSuspend

-620

Optimization Removal Error

An error occurred while suspending optimization.

e4optFlush

-630

Optimization File Flushing Failure

An error occurred during the flushing of optimized file information.

Relation Errors

Constant Name

Value

Meaning

e4relate

-710

Relation Error

A general CodeBase relation error was discovered.

e4lookupErr

-720

Matching Slave Record Not Located

CodeBase could not locate the master record's corresponding slave record.

e4relateRefer

-730

Relation Referred to Does Not Exist or Is Not Initialized

Referenced a non-existent or improperly initialized relation. Possible cases are: non-initialized memory or an invalid pointer has been passed to a relate module function, orfunction calls have occurred in an invalid sequence (for example, Relate4set::skipmay not be called unless Relate4set::tophas previously been called).

Severe Errors

Constant Name

Value

Meaning

e4info

-910

Unexpected Information

CodeBase discovered an unexpected value in one of its internal variables.

e4memory

-920

Out of Memory

CodeBase tried to allocate some memory from the heap, in order to complete afunction call, but no memory was available.

 

 

This usually occurs during a database update process, which happens when a record is appended, written or flushed to disk. During the update, if a new tag block is required, CodeBase will attempt to allocate more memory. If the memory is not available, CodeBase will return the "Out of Memory" error. If this error occurs during the updating process, the index file will most likely become corrupt. It is virtually impossible to escape this error so it is advantageous to allocate all the memory required before any updates are made. Set Code4::memStartBlock to the maximum number of blocks required before opening any index files. See the "Frequently Asked Questions" document for more details. 

e4parm

-930

Unexpected Parameter

A CodeBase function was passed an unexpected parameter value. This can happen when the application programmer forgets to initialize some pointers and thus null pointers are passed to a function.

e4parmNull

-935

Null Input Parameter unexpected

Unexpected parameter - null input.

e4demo

-940

Exceeded Maximum Record Number for Demonstration

Exceeded maximum support due to demo version of CodeBase.

e4result

-950

Unexpected Result

A CodeBase function returned an unexpected result to another CodeBase function.

e4verify

-960

Structure Verification Failure

Unexpected result while attempting to verify the integrity of a structure.

e4struct

-970

Data Structure Corrupt or Not Initialized

CodeBase internal structures have been detected as invalid.

Not Supported Errors

Constant Name

Value

Meaning

e4notIndex

-1010

Library Compiled with S4OFF_INDEX

An attempt was made to call one of the indexing functions but the library was compiled without them.

e4notMemo

-1020

Library Compiled with S4OFF_MEMO

An attempt was made to call one of the memo functions but the library was compiled without them.

e4notWrite

-1040

Library Compiled with S4OFF_WRITE

An attempt was made to write to a file but the library was compiled without this capability.

e4notClipper

-1050

Function Unsupported: Library Compiled with S4CLIPPER

Function not supported in S4CLIPPERimplementation.

e4notSupported

-1090

Function Unsupported

Operation generally not supported

e4version

-1095

Application/Library Version Mismatch

Version mismatch (e.g. client version mismatches server version).

Memo Errors

Constant Name

Value

Meaning

e4memoCorrupt

-1110

Memo File Corrupt

A memo file or entry is corrupt.

e4memoCreate

-1120

Error Creating Memo File

For example, Code4::memSizeMemo is set to an invalid value.

Transaction Errors

Constant Name

Value

Meaning

e4transViolation

-1200

Transaction Violation Error

Attempt to perform an operation that is disallowed within a transaction. (e.g.Data4::packData4::zap, etc.)

e4trans

-1210

Transaction Error

Transaction failure. A common occurrence is if the transaction file is detected to be in an invalid state upon opening.

e4rollback

-1220

Transaction Rollback Failure

An unrecoverable failure occurred while attempting to perform a rollback (e.g. a hard disk failure)

e4commit

-1230

Transaction Commit Failure

Transaction commit failure occurred.

e4transAppend

-1240

Error Appending Information to Log File

An error has occurred while attempting to append data to the transaction log file. One possible reason is running out of disk space. In the client-server configuration, all clients will likely be disconnected and the server will shut down after this failure.

Communication Errors

Constant Name

Value

Meaning

e4corrupt

-1300

Communication Information Corrupt

Corrupted connection information generally would indicate a netowrk hardware/software failure of some type. For example, out of date network drivers might be installed on a client or a server machine. Alternatively, the client application might have been compiled with an unsupported compiler, using unsupported compiler switches, or under an unsupported operating system, resulting in perceived network problems.

e4connection

-1310

Connection Failure

For example, a connection failed to be established or got terminated abruptly by the network.

e4socket

-1320

Socket Failure

All CodeBase software use sockets as their basis for communications. This error indicates a failure in the socket layer of the communications. For example, the selected communication protocol might be unsupported on the given machine. Alternatively, an unsupported version of the networking software might be being used (e.g. Windows Sockets 1.0).

e4net

-1330

Network Failure

A network error occurred. Some CodeBase communications protocols are dependent on network stability. For example, if the local file server is shut-down, CodeBase might not be able to continue operations, and will fail with an e4net error. Alternatively, a physical network error might be detected (e.g. a network cable is physically cut or unplugged, thus removing the physical connection of the computer from the network).

e4loadlib

-1340

Failure Loading Communication DLL

An attempt to load the specified communication DLL has failed. Ensure that the requested DLL is accessible to the application.

e4timeOut

-1350

Network Timed Out

This error occurs whenever CodeBase has timed out after Code4::timeout seconds have elapsed.

e4message

-1360

Communication Message Corrupt

A communication message error has been detected. For example, a client might not have been able to properly send a complete message to the server.

e4packetLen

-1370

Communication Packet Length Mismatch

A packet length error has been detected. Possibly the CodeBase client software mismatches the server implementation.

e4packet

-1380

Communication Packet Corrupt

A packet corruption has been detected. Check e4corrupt for potential causes of this failure.

e4connect

-1390

System-level Communications Error

This error would occur if the network hardware failed or if the server disconnected from the client.

Miscellaneous Errors

Constant Name

Value

Meaning

e4max

-1400

CodeBase Capabilities Exceeded (system maxed out)

The physical capabilities of CodeBase have been maxed out. These errors can often be solved by modifying system or network configuration files which have placed arbitrary limits on the system. This error will also be generated when the maximum number of users for the server is exceeded.

e4codeBase

-1410

CodeBase in an Unacknowledged Error State

CodeBase failed due to being in an error state already. Generally comes out as an error return code if a high-level function is called after having disregarded a CodeBase error condition.

e4name

-1420

Name not Found error

The specified name was invalid or not found. For example, Data4::index was called with a non-existent index alias.

e4authorize

-1430

Authorization Error (access denied)

The requested operation could not be performed because whoever issued the request has insufficient authority to perform the operation. For example, a user without creation privileges has made a call to Data4::create.

Server Failure Errors

Constant Name

Value

Meaning

e4server

-2100

Server Failure

A client-server failure has occurred. In this case, the client connection was probably also lost.

e4config

-2110

Server Configuration Failure

An error has been detected in the server configuration file. The configuration file is only accessed when the server is first started, so once the server is operational, this error cannot occur.