ITTIA DB SQL C++ API  5.4.0
Error Handling

Classes

struct  ErrorInfo
 Error information. More...

Defines

#define _DB_ERROR(n)   ((_dbstatus_t) -n)
#define _DB_WARNING(n)   ((_dbstatus_t) (1 + n))

Typedefs

typedef int _dbstatus_t

Error Codes

#define DB_NOERROR   0
#define DB_FAILURE   -1

OS Errors

#define DB_EBADF   -2
#define DB_EEXIST   -3
#define DB_ENOENT   -4
#define DB_ENOSPACE   -5
#define DB_EIO   -6
#define DB_EACCESS   -7
#define DB_EEXTEND   -8
#define DB_EDEADLOCK   -9
#define DB_ELOCKED   -10

Argument Errors

#define DB_EINVAL   -11
#define DB_ERANGE   -12
#define DB_ESTATE   -13
#define DB_ENOTIMPL   -14
#define DB_ENOMEM   -15
#define DB_EOSERROR   -16
#define DB_ENOTAPPLICABLE   -17
#define DB_ENOTHREAD   -18
#define DB_EINTERNAL   -19
#define DB_EINVPATH   -20
#define DB_EINVFS   -21
#define DB_EDBGFAILURE   -22
#define DB_ENLSSPACE   -23
#define DB_EINVCHAR   -24
#define DB_EINVENC   -25
#define DB_ENOSYS   -26
#define DB_EINVLOCALE   -27

Socket Errors

#define DB_ESOCKETSTARTUP   -50
#define DB_ESOCKETOPEN   -51
#define DB_ESOCKET   -52
#define DB_ESOCKETHOSTNAME   -53
#define DB_ESOCKETCONNECTION   -54
#define DB_ESOCKETRECV   -55
#define DB_ESOCKETSEND   -56
#define DB_ESOCKETNOTCONN   -57
#define DB_ESSLCIPHERKEY   -60
#define DB_ESSLDHPARAMS   -61
#define DB_ESSLCERTIFICATE   -62
#define DB_ESSLCALOCATION   -63

Error test routines

#define DB_SUCCESS(x)   ((int32_t)(x) >= DB_NOERROR)
#define DB_FAILED(x)   ((int32_t)(x) < DB_NOERROR)

Error support routines

int set_db_error (_dbstatus_t rc_t)
_dbstatus_t get_db_error ()
_dbstatus_t clear_db_error ()
void save_db_error (ErrorInfo *)
void restore_db_error (const ErrorInfo *)
#define DB_PUSH_ERROR(__error_info__)   save_db_error(__error_info__)
#define DB_POP_ERROR(__error_info__)   restore_db_error(__error_info__)
#define DB_SET_ERROR(x)   set_db_error(x)
#define DB_RAISE_ERROR(x)   return DB_SET_ERROR(x)
#define DB_THROW_ERROR(x)   do { int __rc__ = (x); if (DB_FAILED(__rc__)) DB_RAISE_ERROR(__rc__); } while(0)
#define DB_ONERROR_GOTO(x, lab)   do { int __rc__ = (x); if (DB_FAILED(__rc__)) goto lab; } while(0)
#define DB_ONERROR_RET(x, result)   do { int __rc__ = (x); if (DB_FAILED(__rc__)) return result; } while(0)

General Errors

#define DB_INCOMPLETE   +113
#define DB_EDUPLICATE   -100
#define DB_ENOTFOUND   -101
#define DB_ENOMOREDATA   -102
#define DB_EKEYOUTOFRANGE   -103
#define DB_EEMPTYRANGE   -104
#define DB_EBTREESLOTTOOLARGE   -105
#define DB_ENEEDREVALIDATE   -106
#define DB_ENORECORD   -107
#define DB_ENAME   -109
#define DB_EROWRANGE   -110
#define DB_ESHUTDOWN   -111
#define DB_ECONNLOCK   -112
#define DB_ECURSORMODE   -114
#define DB_ECIPHER   -115
#define DB_ECIPHERDATA   -116

Table Errors

#define DB_ETABLE   -120
#define DB_ETABLETYPE   -121
#define DB_ENOTABLE   -122
#define DB_ENOMEMSTORAGE   -123
#define DB_ENOCONSTRAINT   -125
#define DB_ETABLEEXISTS   -126

Index Errors

#define DB_EINDEX   -130
#define DB_EPRIMARYDUP   -131
#define DB_EFKREFERENCE   -132
#define DB_EFKRESTRICTED   -133
#define DB_EFKMATCHFULL   -134
#define DB_EFKEYDEF   -135
#define DB_EFKLIMIT   -136
#define DB_ECLUSTERKEY   -137

Field Errors

#define DB_EFIELD   -140
#define DB_EDUPLICATEFIELDS   -141
#define DB_EFIELDSIZE   -142
#define DB_EBINDSIZE   -143
#define DB_EPARAM   -144
#define DB_EINDVALUE   -145
#define DB_ENULLFIELD   -146
#define DB_EFIELDTYPE   -147
#define DB_EBLOB   -148

Sequence Errors

#define DB_ESEQ   -150
#define DB_ESEQ_OVERFLOW   -151
#define DB_ESEQ_NOCURVAL   -152

Row Errors

#define DB_EINVALROWTYPE   -160
#define DB_EINVALKEYTYPE   -161
#define DB_EKEYTOOSHORT   -162
#define DB_ERECORDSIZE   -163

Data Errors

#define DB_EBOOKMARK   -167
#define DB_EINVALIDINTERVAL   -168
#define DB_ECURSOR   -169
#define DB_EDATA   -170
#define DB_ECONVERT   -171
#define DB_EINVTYPE   -173
#define DB_EINVALIDNUMBER   -408

Kernel Errors

#define DB_ENOBUFFER   -172
#define DB_ESTORAGE   -174
#define DB_ECRC   -175
#define DB_ERECOVERY   -176
#define DB_EUNDOSPACE   -177
#define DB_EJOURNALTYPE   -178
#define DB_EJOURNAL   -179
#define DB_EJOURNALCRC   -180
#define DB_EPREPARED   -181
#define DB_ENOJOURNALREC   -182
#define DB_EINVPAGE   -183
#define DB_EREADONLY   -184
#define DB_ENOPAGESPACE   -185
#define DB_EPASSWORD   -186

Transaction Errors

#define DB_ENOTX   -190
#define DB_ETXSTATE   -191
#define DB_ETXACTIVE   -192
#define DB_ESAVEPOINTEXIST   -193
#define DB_ENOSAVEPOINT   -194
#define DB_ETXKIND   -195
#define DB_EDTMXID   -196

Shared Access Errors

#define DB_ENOLOCK   -200
#define DB_EMAXLOCKERS   -201
#define DB_EINVLOCK   -202
#define DB_EWAITINTR   -203
#define DB_ENOLOCKOBJ   -204

Other Errors

#define DB_EUSER   -210
#define DB_EAPIVER   -220
#define DB_EEVALUATION   -250

IPC Client/Server Errors

#define DB_EIPCPROTO   -300
#define DB_EIPCINVAL   -301
#define DB_EIPCINVALMESSAGETAG   -302
#define DB_EIPCINVALPROCTAG   -303
#define DB_EIPCSTORAGEALREADYOPENED   -304
#define DB_EIPCSTORAGENOTOPENED   -305
#define DB_EIPCINVALHANDLE   -306
#define DB_EIPCNULLPARAM   -307
#define DB_EIPCTOOFEWPARAMS   -308
#define DB_EIPCINVALMESSAGESIZE   -309
#define DB_EIPCINVALMESSAGEFORMAT   -310
#define DB_EIPCINVALURL   -311
#define DB_EIPCINVALURLSCHEMA   -312
#define DB_EIPCENVSTARTUP   -313
#define DB_EIPCACCESS   -314
#define DB_EIPCMAXCONNECTIONS   -315
#define DB_EIPCALREADYSTARTED   -316
#define DB_EIPCNOLISTENER   -317
#define DB_EIPCDISCONNECT   -318

SQL Statement Errors

#define DB_ESQLCODESIZETOOLARGE   -400
#define DB_ESQLTABLENOTEXISTS   -401
#define DB_ESQLINVALIDCOLUMNNAME   -402
#define DB_ESQLCOLUMNAMBIGUOUSLYDEFINED   -403
#define DB_ESQLINCOMPATIBLETYPES   -404
#define DB_ESQLINVALIDFUNCTIONNAME   -405
#define DB_ESQLINVALIDNUMBEROFARGUMENTS   -406
#define DB_ESQLININVALIDARGUMENTTYPE   -407
#define DB_ESQLINVALIDQUALIFIER   -409
#define DB_ESQLINCOMPATIBLEROWTYPES   -410
#define DB_ESQLPARSEERROR   -411
#define DB_ESQLNOTAGROUPBYEXPRESSION   -412
#define DB_ESQLFEATURENOTALLOWED   -413
#define DB_ESQLDIVIDEBYZERO   -414
#define DB_ESQLTYPECVTNOTIMPLEMENTED   -415
#define DB_ESQLOPERATIONNOTIMPLEMENTED   -416
#define DB_ESQLINVALIDRELATIONALOPERATOR   -417
#define DB_ESQLROWSIZETOOLARGE   -418
#define DB_ESQLNOTSORTABLETYPE   -419
#define DB_ESQLNOENOUGHVALUES   -420
#define DB_ESQLTOOMANYVALUES   -421
#define DB_ESQLBOOLEXPRESSIONINSELECTLIST   -422
#define DB_ESQLENV   -423
#define DB_ESQLINCONSISTENTPARAMTYPE   -424
#define DB_ESQLCOULDNOTDEDUCEPARAMTYPE   -425
#define DB_ESQLINVALIDPARAMINDEX   -426
#define DB_ESQLPARAMCONVERT   -427
#define DB_ESQLMIXEDPARAMSTYLE   -428
#define DB_ESQLINVALIDCOLUMNINDEX   -429
#define DB_ESQLINVALIDSORTCOLUMN   -430
#define DB_ESQLINVALIDEXPRTYPE   -431
#define DB_ESQLBINARYLITERAL   -432

Replication Errors

#define DB_EREP_PEERPATH   -500
#define DB_EREP_PEERADDRESS   -501
#define DB_EREP_ADDRESS   -502
#define DB_EREP_INVADDRESS   -503
#define DB_EREP_LOOPBACK   -504
#define DB_EREP_NOPEER   -505
#define DB_EREP_CONFLICT   -506
#define DB_EREP_NOCONN   -507
#define DB_EREP_BUFSIZE   -508
#define DB_EREP_PEERTYPE   -509

Synchronization Errors

#define DB_ESYNC_NODB   -600
#define DB_ESYNC_DUPLICATEDB   -601
#define DB_ESYNC_CONNECT   -602

Detailed Description

Errors, warnings, return codes, and related helper functions.

Most C++ API functions return an error code. To determine whether an operation was successful, check the return code with DB_SUCCESS or DB_FAILED. Some error codes are only warnings, and are considered success.


Define Documentation

#define DB_NOERROR   0

No error occurred.

#define DB_FAILURE   -1

Operation failed.

#define DB_EBADF   -2

Invalid file handle.

#define DB_EEXIST   -3

File exists.

#define DB_ENOENT   -4

File doesn't exist.

#define DB_ENOSPACE   -5

No space available.

#define DB_EIO   -6

I/O error.

Error reading or writing from disk or other permanent storage.

#define DB_EACCESS   -7

Invalid access mode.

#define DB_EEXTEND   -8

File operation is out of file size.

#define DB_EDEADLOCK   -9

Unable to lock - deadlock condition detected.

This error occurs under shared access when an operation cannot be completed because of a deadlock condition.

A deadlock condition occurs when two concurrent transactions hold locks on the same rows such that neither can complete until the other is finished.

To handle this error, abort the transaction and start over.

This error only occurs if a deadlock is detected. Some deadlocks involving more than two transactions cannot be detected and will result in a

DB_ELOCKED error when the operation times out.

#define DB_ELOCKED   -10

Unable to acquire lock.

The operation cannot be completed because a necessary resource is locked.

The locked resource can be either a schema object such as a table or index, or a row in a table.

A table's schema cannot be modified while there is an open cursor for that table. If this error is encountered when attempting to modify table columns or indexes, ensure that all cursors for that table have been closed.

When modifying a row in a table, DB_ELOCKED will occur if the row cannot be locked within the timeout period.

#define DB_EINVAL   -11

Invalid argument.

#define DB_ERANGE   -12

Argument is out of range.

#define DB_ESTATE   -13

Object state is not compatible with the method called or arguments.

#define DB_ENOTIMPL   -14

The requested functionality is not implemented in the current library package.

Lock manager configuration is not available when using the single-user package because no lock manager is used.

#define DB_ENOMEM   -15

[HY001] No memory available for allocation.

#define DB_EOSERROR   -16

General operating system error.

#define DB_ENOTAPPLICABLE   -17

Not applicable.

#define DB_ENOTHREAD   -18

No such thread.

#define DB_EINTERNAL   -19

Internal error detected.

#define DB_EINVPATH   -20

Invalid path encoding.

#define DB_EINVFS   -21

Invalid file system requested.

#define DB_EDBGFAILURE   -22

Simulated failure for debugging.

#define DB_ENLSSPACE   -23

Not enough space for NLS conversion.

#define DB_EINVCHAR   -24

Invalid character for NLS conversion.

#define DB_EINVENC   -25

Invalid encoding for NLS conversion.

#define DB_ENOSYS   -26

A required function is not supported on this platform.

#define DB_EINVLOCALE   -27

Invalid or unknown locale name.

#define DB_ESOCKETSTARTUP   -50

Socket startup error.

#define DB_ESOCKETOPEN   -51

Socket open error.

#define DB_ESOCKET   -52

General socket error.

#define DB_ESOCKETHOSTNAME   -53

Host name error.

#define DB_ESOCKETCONNECTION   -54

Connection error.

#define DB_ESOCKETRECV   -55

Socket data receive error.

#define DB_ESOCKETSEND   -56

Socket data send error.

#define DB_ESOCKETNOTCONN   -57

Socket is not connected.

#define DB_ESSLCIPHERKEY   -60

Private key is not valid.

#define DB_ESSLDHPARAMS   -61

Diffie-Hellmap parameteres are not valid.

#define DB_ESSLCERTIFICATE   -62

Certificate chain is not valid.

#define DB_ESSLCALOCATION   -63

CA file is not valid.

#define DB_SUCCESS (   x)    ((int32_t)(x) >= DB_NOERROR)

Test whether an error code represents a successful result.

Parameters:
xError code to be tested.
Returns:
true when the operation that set x was successful.
See also:
DB_FAILED, Error Handling
#define DB_FAILED (   x)    ((int32_t)(x) < DB_NOERROR)

Test whether an error code represents a failed result.

Parameters:
xError code to be tested.
Returns:
true when the operation that set x was not successful.
See also:
DB_SUCCESS, Error Handling
#define DB_PUSH_ERROR (   __error_info__)    save_db_error(__error_info__)

Store the current error code.

Parameters:
<strong>error_info</strong>Destination for the error code.
#define DB_POP_ERROR (   __error_info__)    restore_db_error(__error_info__)

Restore the current error code.

Parameters:
<strong>error_info</strong>Source of the error code.
#define DB_SET_ERROR (   x)    set_db_error(x)

Set the given error code.

Parameters:
xthe error code.
See also:
DB_THROW_ERROR, DB_RAISE_ERROR
#define DB_RAISE_ERROR (   x)    return DB_SET_ERROR(x)

Set the given error code and return it to the caller.

Parameters:
xthe error code.
See also:
DB_THROW_ERROR, DB_SET_ERROR
#define DB_THROW_ERROR (   x)    do { int __rc__ = (x); if (DB_FAILED(__rc__)) DB_RAISE_ERROR(__rc__); } while(0)

If x is an error, throw it to the caller.

Otherwise, continue.

Parameters:
xthe error code.
See also:
DB_RAISE_ERROR, DB_SET_ERROR, DB_ONERROR_GOTO
#define DB_ONERROR_GOTO (   x,
  lab 
)    do { int __rc__ = (x); if (DB_FAILED(__rc__)) goto lab; } while(0)

If x is an error, go to lab.

Otherwise, continue.

Parameters:
xthe error code.
lablabel to go to in case of error.
See also:
DB_RAISE_ERROR, DB_SET_ERROR, DB_THROW_ERROR
#define DB_INCOMPLETE   +113

Operation did not finish completely.

#define DB_EDUPLICATE   -100

Duplicate value not allowed.

#define DB_ENOTFOUND   -101

When attempting to modify a schema object, DB_ENOTFOUND indicates that the schema object could not be found.

Item not found.

This error also occurs when attempting to fetch data from a cursor that is not positioned on any row, and when a seek operation yields no result.

#define DB_ENOMOREDATA   -102

This error occurs when the cursor cannot be advanced because it is already positioned beyond the end of the table.

No more data.

#define DB_EKEYOUTOFRANGE   -103

Key out of range.

Note:
This is an internal error. It is transformed by TableManager into

DB_ENOMOREDATA.

#define DB_EEMPTYRANGE   -104

An attempt was made to set an empty range.

#define DB_EBTREESLOTTOOLARGE   -105

An attempt was made to insert into a B+tree a key and data that is too large.

#define DB_ENEEDREVALIDATE   -106

B+tree iterator needs revalidation.

Note:
This is an internal error.
#define DB_ENORECORD   -107

No record found.

#define DB_ENAME   -109

Invalid name.

#define DB_EROWRANGE   -110

Too many records in a table.

#define DB_ESHUTDOWN   -111

Shutdown is in progress.

#define DB_ECONNLOCK   -112

Connection is used by another thread.

#define DB_ECURSORMODE   -114

Invald or unsupported cursor mode.

#define DB_ECIPHER   -115

Invalid cipher type.

#define DB_ECIPHERDATA   -116

Invalid cipher data.

#define DB_ETABLE   -120

General table error.

#define DB_ETABLETYPE   -121

Unknown table type.

#define DB_ENOTABLE   -122

No such table.

#define DB_ENOMEMSTORAGE   -123

Cannot create a memory table.

Memory storage is not open, memory_storage_size is 0.

Ensure that the memory_storage_size parameter is not 0 before connecting to or opening the database.

#define DB_ENOCONSTRAINT   -125

No such constraint defined.

#define DB_ETABLEEXISTS   -126

Table already exists.

#define DB_EINDEX   -130

General index error.

#define DB_EPRIMARYDUP   -131

Multiple primary keys defined.

#define DB_EFKREFERENCE   -132

Referenced row not found.

#define DB_EFKRESTRICTED   -133

Operation is restricted due to references.

#define DB_EFKMATCHFULL   -134

Operation is restricted due to incomplete full row match.

#define DB_EFKEYDEF   -135

Invalid foreign key definition.

#define DB_EFKLIMIT   -136

Too many cascade operations.

#define DB_ECLUSTERKEY   -137

Invalid cluster key.

#define DB_EFIELD   -140

When creating a table or binding a field to a row, this error indicates that an invalid name has been used for a field.

General field error.

#define DB_EDUPLICATEFIELDS   -141

Cannot create duplicate fields.

#define DB_EFIELDSIZE   -142

Invalid field size.

#define DB_EBINDSIZE   -143

When binding a field to a variable or memory address, this error indicates that the given size is invalid for the field's data type.

Invalid bind size.

#define DB_EPARAM   -144

Invalid parameter.

#define DB_EINDVALUE   -145

Length indicator value exceeds buffer size or is an invalid negative number.

#define DB_ENULLFIELD   -146

This error will also occur a NOT NULL field is added to a non-empty table, or when a column containing null values is set to NOT NULL.

Insert or update would violate a NOT NULL constraint, or primary key must be NOT NULL.

#define DB_EFIELDTYPE   -147

Invalid field type.

#define DB_EBLOB   -148

Invalid blob operation.

#define DB_ESEQ   -150

Get the next value before getting the current value in each transaction.

General sequence error.

#define DB_ESEQ_OVERFLOW   -151

Sequence overflow: no unique values remain.

#define DB_ESEQ_NOCURVAL   -152

Sequence does not yet have a current value, get the next value first.

#define DB_EINVALROWTYPE   -160

Invalid row type.

#define DB_EINVALKEYTYPE   -161

Invalid key type.

#define DB_EKEYTOOSHORT   -162

Key is too short.

#define DB_ERECORDSIZE   -163

Record size is too large for chosen page size.

#define DB_EBOOKMARK   -167

Bookmark is not valid.

#define DB_EINVALIDINTERVAL   -168

Invalid INTERVAL type literal.

#define DB_ECURSOR   -169

Invalid cursor for the given operation.

#define DB_EDATA   -170

Invalid field data value.

#define DB_ECONVERT   -171

Incompatible types: conversion is not possible.

#define DB_ENOBUFFER   -172

No available buffers.

#define DB_EINVTYPE   -173

Invalid column/var type.

#define DB_ESTORAGE   -174

Storage data is invalid.

#define DB_ECRC   -175

CRC verification failed: database integrity has been compromised.

#define DB_ERECOVERY   -176

Storage needs crash recovery.

#define DB_EUNDOSPACE   -177

Overflow in undo log space, unable to write entries required for rollback.

#define DB_EJOURNALTYPE   -178

Invalid journal type.

#define DB_EJOURNAL   -179

Invalid journal.

#define DB_EJOURNALCRC   -180

Journal CRC validation failed.

#define DB_EPREPARED   -181

Prepared transactions support is required to complete operation.

#define DB_ENOJOURNALREC   -182

Requested journal record not found.

#define DB_EINVPAGE   -183

Invalid page number.

#define DB_EREADONLY   -184

Storage is in the read only mode.

#define DB_ENOPAGESPACE   -185

Storage run out of disk space.

#define DB_EPASSWORD   -186

Access password is not valid or access is denied.

#define DB_ENOTX   -190

No transaction is active.

#define DB_ETXSTATE   -191

Schema modifications such as creating a table can only be performed when no transaction is active.

The operation cannot be performed in the current transaction state.

Data modifications such as inserting a row must be performed while a transaction is active. Otherwise a DB_ETXSTATE error will occur.

#define DB_ETXACTIVE   -192

Transaction is already running.

#define DB_ESAVEPOINTEXIST   -193

Savepoint already exists.

#define DB_ENOSAVEPOINT   -194

Specified savepoint does not exist.

#define DB_ETXKIND   -195

Operation cannot be performed for such transaction type (f.e local commit cannot be done on prepared transaction).

#define DB_EDTMXID   -196

Invalid DTM xid provided.

#define DB_ENOLOCK   -200

There are no available lock cells.

#define DB_EMAXLOCKERS   -201

There are too many lockers.

#define DB_EINVLOCK   -202

Unlock request for a lock that has not been obtained.

#define DB_EWAITINTR   -203

Lock waiting interrupted.

#define DB_ENOLOCKOBJ   -204

There are no available lock object cells.

#define DB_EUSER   -210

User generated error.

#define DB_EAPIVER   -220

This error occurs when the application has been compiled for a version of the API that is not compatible with the version of the library that has been linked in to the application.

API not initialized or feature not available in this version of the API.

#define DB_EEVALUATION   -250

Operation not permitted in evaluation version.

#define DB_EIPCPROTO   -300

No compatible protocol negotiated .

#define DB_EIPCINVAL   -301

Invalid parameter in IPC message.

#define DB_EIPCINVALMESSAGETAG   -302

Invalid parameter in IPC message.

#define DB_EIPCINVALPROCTAG   -303

Invalid procedure tag in IPC CALL message.

#define DB_EIPCSTORAGEALREADYOPENED   -304

Storage already opened.

#define DB_EIPCSTORAGENOTOPENED   -305

Storage not opened .

#define DB_EIPCINVALHANDLE   -306

Invalid object's handle.

#define DB_EIPCNULLPARAM   -307

Complex parameter is NULL.

#define DB_EIPCTOOFEWPARAMS   -308

Too few parameters in message .

#define DB_EIPCINVALMESSAGESIZE   -309

Invalid message size.

#define DB_EIPCINVALMESSAGEFORMAT   -310

Invalid message format.

#define DB_EIPCINVALURL   -311

Invalid URL format.

#define DB_EIPCINVALURLSCHEMA   -312

Invalid URL schema .

#define DB_EIPCENVSTARTUP   -313

IPC environment startup error.

#define DB_EIPCACCESS   -314

Disabled operations.

#define DB_EIPCMAXCONNECTIONS   -315

Maximum connections is reached .

#define DB_EIPCALREADYSTARTED   -316

Server is already running.

#define DB_EIPCNOLISTENER   -317

No listeners.

#define DB_EIPCDISCONNECT   -318

Connection has been dropped.

#define DB_ESQLCODESIZETOOLARGE   -400

Generated code exceeds maximum code size.

#define DB_ESQLTABLENOTEXISTS   -401

Table does not exist.

#define DB_ESQLINVALIDCOLUMNNAME   -402

Invalid column name.

Column ambiguously defined.

#define DB_ESQLINCOMPATIBLETYPES   -404

Incompatible types.

#define DB_ESQLINVALIDFUNCTIONNAME   -405

Invalid function name.

Invalid number of arguments.

#define DB_ESQLININVALIDARGUMENTTYPE   -407

Invalid argument type.

#define DB_EINVALIDNUMBER   -408

Invalid number.

#define DB_ESQLINVALIDQUALIFIER   -409

Invalid qualifier.

#define DB_ESQLINCOMPATIBLEROWTYPES   -410

Incompatible row types.

#define DB_ESQLPARSEERROR   -411

Error parsing SQL syntax.

#define DB_ESQLNOTAGROUPBYEXPRESSION   -412

Selected field is not a group-by expression.

#define DB_ESQLFEATURENOTALLOWED   -413

Feature not allowed.

#define DB_ESQLDIVIDEBYZERO   -414

Divide by zero.

#define DB_ESQLTYPECVTNOTIMPLEMENTED   -415

Cannot convert to incompatible type.

#define DB_ESQLOPERATIONNOTIMPLEMENTED   -416

Operation not implemented.

Invalid relation.

#define DB_ESQLROWSIZETOOLARGE   -418

Row size too large.

#define DB_ESQLNOTSORTABLETYPE   -419

Ordered by non-sortable type.

#define DB_ESQLNOENOUGHVALUES   -420

Not enough values specified.

#define DB_ESQLTOOMANYVALUES   -421

Too many values specified.

Boolean expression in select list.

#define DB_ESQLENV   -423

SQL environment error.

#define DB_ESQLINCONSISTENTPARAMTYPE   -424

Inconsistent parameter type.

#define DB_ESQLCOULDNOTDEDUCEPARAMTYPE   -425

Could not deduce parameter type from context.

#define DB_ESQLINVALIDPARAMINDEX   -426

Missing parameter value.

#define DB_ESQLPARAMCONVERT   -427

Could not convert parameter to required type.

#define DB_ESQLMIXEDPARAMSTYLE   -428

Mixed parameter style (? and $) not supported.

#define DB_ESQLINVALIDCOLUMNINDEX   -429

Invalid column number.

#define DB_ESQLINVALIDSORTCOLUMN   -430

Invalid column number in order by clause.

#define DB_ESQLINVALIDEXPRTYPE   -431

Invalid expression type, boolean may be expected.

#define DB_ESQLBINARYLITERAL   -432

Invalid BINARY type literal.

#define DB_EREP_PEERPATH   -500

Path to peer is unknown.

#define DB_EREP_PEERADDRESS   -501

Invalid or unset peer address.

#define DB_EREP_ADDRESS   -502

Invalid or unset replication address.

#define DB_EREP_INVADDRESS   -503

Peer address mismatch.

#define DB_EREP_LOOPBACK   -504

Attempt to replicate with a database having the same address.

#define DB_EREP_NOPEER   -505

Unknown replication peer.

#define DB_EREP_CONFLICT   -506

Conflict when propagating to replication peer.

#define DB_EREP_NOCONN   -507

Unable to open connection to replication peer.

#define DB_EREP_BUFSIZE   -508

Buffer underflow during replication.

#define DB_EREP_PEERTYPE   -509

Peer type is not valid.

#define DB_ESYNC_NODB   -600

No such database.

#define DB_ESYNC_DUPLICATEDB   -601

Duplicate databases are not allowed.

#define DB_ESYNC_CONNECT   -602

Unable to connect to the sync database.


Typedef Documentation

typedef int _dbstatus_t

Error code type: indicates success, warning, or error condition.

See also:
Error Handling

Function Documentation

int set_db_error ( _dbstatus_t  rc_t)

Set error code.

Note:
Do not call this function directly. Use DB_SET_ERROR instead.
Parameters:
rc_terror code
See also:
DB_THROW_ERROR, DB_RAISE_ERROR, DB_SET_ERROR

Get the most recent error code.

Note:
This value is not cleared by any API calls except clear_db_error. To check for an error in any of a series of calls, first call clear_db_error, then call each API function, and finally use get_db_error to check the result.
Returns:
the last error code that was set.
See also:
clear_db_error

Clear the current error code.

See also:
get_db_error
void save_db_error ( ErrorInfo )

Save the current error code to an ErrorInfo.

void restore_db_error ( const ErrorInfo )

Restore the current error code from an ErrorInfo.