Data Pro Knowledgebase



Codebase Error Codes

dBASE Error Codes

The following tables list the error codes that are returned by CodeBase functions, which signal that an error has occurred. The tables display the integer constants and the corresponding small error descriptions accompanied by a more detailed explanation.

General Disk Errors

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 which is open, having a full directory, or by having a disk problem.

Refer to the CODE4.safety and CODE4.errCreate flags in the CodeBase 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 e4open, 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 is set to true (non-zero) and an attempt is made to modify an unlocked record.

e4open

-60

Opening File

A general file failure occurred opening a file. This error may also include any of the -6x errors listed below if the selected 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 may have 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

Maximum file handle count exceeded. The server executable has been built with modified runtime 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.

For non client-server 'Basic' applications, the provided non client-server DLLs have been built with a 255 file handle limit to prevent this type of error from occurring. If you receive this error, reduce the number of files opened in your application 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 ODE4.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 environment, 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 d4go 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.

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 is corrupted. It will also occur when creating a data file with an invalid field type.

e4fieldName

-210

Unrecognized Field Name

A function, such as d4field, 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.

e4append

-240

Record Append Attempt Past End of File

e4seek

-250

Seeking

This error can occur if int d4seekDouble 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 which would have resulted in a duplicate tag key for a unique key tag. In addition, t4unique returned e4unique or, when creating an index file, the member TAG4INFO.unique specified e4unique.

e4tagInfo

-350

Tag information is invalid

Usually occurs when calling d4create or i4create 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 to d4alias and d4aliasSet.

e4lengthErr

-422

IIF() Needs Parameters of Same Length

The second and third parameters of dBASE 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 dBASE expression is wrong.

e4overflow

-440

Overflow while Evaluating Expression

The dBASE expression was too long or complex for CodeBase to handle. Such an expression would be extremely long and complex.

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

e4rightMissing

-450

Right Bracket Missing

The dBASE 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 dBASE expression "3 } 7", the character '}' is in a place where a dBASE operator would be expected.

e4unrecValue

-490

Unrecognized Value

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

e4unterminated

-500

Unterminated String

According to dBASE 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 calling d4create or i4create.

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, or function calls have occurred in an invalid sequence (for example, relate4skip may not be called unless relate4top has 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 a function 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

e4notSupported

-1090

Function unsupported

Operation generally not supported in this configuration.

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, the CODE4.memSizeMemo is set to an invalid value.

Transaction Errors

Constant Name

Value

Meaning

e4transViolation

-1200

Transaction Violation Error

Attempt to perform an operation within a transaction which is disallowed (e.g. d4pack, d4zap, 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 possibility is out of disk space. In the client/server version, all clients will likely be disconnected after this failure.

Communication Errors

Constant Name

Value

Meaning

e4corrupt

-1300

Communication Information Corrupt

Connection information corrupt. In general would indicate a network hardware/software failure of some sort. For example, out of date device drivers may be being used on either a client or a server machine.

Alternatively, the client application may 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

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

e4socket

-1320

Socket Failure

A 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 may be unsupported on the given machine. Alternatively, an unsupported version of the networking software may be being used (e.g. Windows Sockets 1.0 or Novell 2.x).

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 shutdown, CodeBase may be unable to continue operations, and may therefore fail with an e4net error. Alternatively, a physical network error may be detected (for example, if 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. This error may also occur if attempting to start a client or server under Windows if Windows is unstable.

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 may have not 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

-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. For example, the maximum allowable connections for a computer may have been exceeded by the server. Often these errors can 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, d4index was called with a non-existent index alias.

e4authorize

-1430

Authorization Error (access denied)

The requested operation could not be performed because the requester has insufficient authority to perform the operation. For example, a user without creation privileges has made a call to d4create.

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.

e4cat

-2120

Catalog Failure

A catalog failure has occurred. For example, the catalog file may exist but may be corrupt.



Related Articles

No related articles were found.

Attachments

No attachments were found.

Visitor Comments

No visitor comments posted. Post a comment

Post Comment for "Codebase Error Codes"

To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.

   Name:
   Email:
* Comment:
* Enter the code below:

 

Article Details

Last Updated
24th o September, 2008

Would you like to...

Print this page  Print this page

Email this page  Email this page

Post a comment  Post a comment

 Subscribe me

Subscribe me  Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF


User Opinions



How would you rate this answer?




Thank you for rating this answer.

Continue