This is the base class for the IldDbms
and IldRequest
classes.
More...
#include <ildblink/ildbase.h>
Public Member Functions | |
virtual | ~IldIldBase () |
Destructor for the base class of DB Link session and cursor classes. More... | |
void | clearDiagnostics () |
Set diagnostic flags to false. More... | |
virtual const IldDiagnostic * | getError () const =0 |
Get the error container. More... | |
virtual IlInt | getErrorCode () const =0 |
Get the error code. More... | |
virtual const char * | getErrorConnection () const =0 |
Get the conneciton string. More... | |
virtual const char * | getErrorMessage () const =0 |
Get the error message text. More... | |
virtual const char * | getErrorName () const =0 |
Get the error object name. More... | |
virtual IldErrorOrigin | getErrorOrigin () const =0 |
Get the error origin. More... | |
virtual IldErrorReporter * | getErrorReporter () const =0 |
Get the error reporter. More... | |
virtual const char * | getErrorSqlstate () const =0 |
Get the SQL state. More... | |
virtual const IldDiagnostic * | getInformation () const =0 |
Get the information container. More... | |
virtual IlInt | getInformationCode () const =0 |
Get the information code. More... | |
virtual const char * | getInformationMessage () const =0 |
Get the information message. More... | |
virtual IlBoolean | isErrorRaised () const =0 |
Tell if an error was raised. More... | |
virtual IlBoolean | isInformationRaised () const =0 |
Tell if a warning was raised. More... | |
virtual int | operator! () const =0 |
Tell if an error was raised. More... | |
virtual void | setError (IldDiagnostic *diag)=0 |
Set the diagnostic container provided as the error container. More... | |
virtual void | setInformation (IldDiagnostic *diag)=0 |
Set the diagnostic container provided as the warning container. More... | |
virtual void | setNumericUse (IlBoolean flag)=0 |
Turn the numeric-as-objects feature ON or OFF. More... | |
virtual void | setStringDateUse (IlBoolean flag=IlTrue)=0 |
Turn the date-as-string feature ON or OFF. More... | |
virtual void | setStringNumericUse (IlBoolean flag=IlTrue)=0 |
Turn the number-as-string feature ON or OFF. More... | |
virtual IlBoolean | useNumeric () const =0 |
Tell if numeric data is handled as objects. More... | |
virtual IlBoolean | useStringDate () const =0 |
Tell if date values will be sent and retrieved as strings. More... | |
virtual IlBoolean | useStringNumeric () const =0 |
Tell if numeric are handled as strings. More... | |
This is the base class for the IldDbms
and IldRequest
classes.
Library: dbkernel
Its purpose is to serve as the common base object, which is the only one known by the error handling mechanism.
IldDbms
, IldErrorOrigin
, IldErrorReporter
, IldRequest
, IlNumeric
|
virtual |
Destructor for the base class of DB Link session and cursor classes.
void IldIldBase::clearDiagnostics | ( | ) |
Set diagnostic flags to false.
Only to be used once the error or information diagnostic has been processed.
|
pure virtual |
Get the error container.
isErrorRaised
returns IlFalse
, this container can either be the null
pointer or be valid but its slot values are not meaningful. Implemented in IldBaseModel.
|
pure virtual |
Get the error code.
This member function must not be called when no error is raised.
Implemented in IldBaseModel.
|
pure virtual |
Get the conneciton string.
This value is filled by DB Link when it detects an error in the connection arguments. This may be the DBMS name if it is unknown or if the corresponding library is not linked, or it may be the connection string if it is not properly formatted.
Implemented in IldBaseModel.
|
pure virtual |
Get the error message text.
This member function must not be called unless an error has been raised.
Implemented in IldBaseModel.
|
pure virtual |
Get the error object name.
For instance, if the error is "Unknown relation", the function returns the name of the relation.
Implemented in IldBaseModel.
|
pure virtual |
Get the error origin.
With most RDBMSs, it differentiates origins only between the server and the DB Link API.
Implemented in IldBaseModel.
|
pure virtual |
Get the error reporter.
If none was set by the application, it returns null
.
Implemented in IldRequest, IldDbms, IldBaseModel, IldRequestModel, and IldDbmsModel.
|
pure virtual |
Get the SQL state.
This is always a five-character string. It may be composed of null
characters only if no SQL state description was made available by the RDBMS server that raised the error.
When an error is raised by the DB Link API, the class part of the message (the first two characters) is set to IL.
DB Link-Specific SQLSTATE Values |
ILD_SQS_FATAL |
ILD_SQS_TYPE |
ILD_SQS_REQ |
ILD_SQS_UNKRE |
ILD_SQS_BDBS |
ILD_SQS_BCOLN |
ILD_SQS_BCNT |
ILD_SQS_PRIV |
ILD_SQS_EOBJ |
ILD_SQS_BFIL |
ILD_SQS_NREP |
ILD_SQS_INVS |
ILD_SQS_NOPR |
ILD_SQS_NOSCR |
Since some predefined errors are identified by DB Link, a few other SQLSTATE values may have been set by it:
Codes | SQLSTATE value |
ILD_SQS_ACON | "08002" |
ILD_SQS_NCON | "08003" |
ILD_SQS_TMSM | "22005" |
ILD_SQS_RNGE | "21000" |
ILD_SQS_NROW | "02000" |
ILD_SQS_NIMP | "0A000" |
ILD_SQS_BIND | "07009" |
ILD_SQS_NINT | "22005" |
ILD_SQS_DEIP | "22023" |
Implemented in IldBaseModel.
|
pure virtual |
Get the information container.
isInformationRaised
returns IlFalse
, this container can either be the null
pointer or be valid but its slot values are not meaningful. Implemented in IldBaseModel.
|
pure virtual |
Get the information code.
This member function must not be called when no information is raised.
Implemented in IldBaseModel.
|
pure virtual |
Get the information message.
This member function must not be called unless a warning has been raised.
Implemented in IldBaseModel.
|
pure virtual |
Tell if an error was raised.
IlTrue
if an error has been raised in the current object. Otherwise, it returns IlFalse
.This function must always be called prior to accessing the diagnostic object or any of its slots.
Implemented in IldBaseModel.
|
pure virtual |
Tell if a warning was raised.
IlTrue
if a warning or other information message has been raised in the current object. Otherwise, it returns IlFalse
.This function must always be called prior to accessing the diagnostic object or any of its slots.
Implemented in IldBaseModel.
|
pure virtual |
Tell if an error was raised.
1
if an error has been raised in the current object. Otherwise, this operator returns 0
.It is intended to be used in conjunction with all functions from the classes IldDbms
and IldRequest
that return the invoker by reference.
Implemented in IldBaseModel.
|
pure virtual |
Set the diagnostic container provided as the error container.
diag | The diagnostic container to use. |
Implemented in IldBaseModel.
|
pure virtual |
Set the diagnostic container provided as the warning container.
diag | The diagnostic container to use. |
Implemented in IldBaseModel.
|
pure virtual |
Turn the numeric-as-objects feature ON or OFF.
flag | The value to set. |
In the default configuration, the flag parameter is set to IlFalse
, which means that numeric data is handled as the double
type. If the value is IlTrue
, numeric data is handled as objects.
Implemented in IldBaseModel.
Turn the date-as-string feature ON or OFF.
flag | The value to set. |
By default, dates are handled as strings. If the argument flag is set to IlFalse
, dates are not handled as strings, but rather as IldDateTime
objects. See the class IldDateTime
and the member function IldRequest::getColDateTimeValue()
.
Implemented in IldBaseModel.
Turn the number-as-string feature ON or OFF.
flag | The value to set. |
In the default configuration, the value of the flag parameter is IlFalse
, which means that numeric data is handled as the double
type. If the value of flag is IlTrue
, numeric data is handled as strings.
Implemented in IldBaseModel.
|
pure virtual |
Tell if numeric data is handled as objects.
IlFalse
if numeric data is to be handled as IlNumeric
objects, or IlTrue
if it is to be handled as the double
type.For more information about how to manage numeric data, see the section "Numeric As Objects" in the Rogue Wave DB Link User's Manual.
Implemented in IldBaseModel.
|
pure virtual |
Tell if date values will be sent and retrieved as strings.
IlTrue
if dates will be handled as strings, or IlFalse
if they will be handled as IldDateTime
objects.For more information on how to manage dates, times, and intervals, see the section "Date As String" in the Rogue Wave DB Link User's Manual.
Implemented in IldBaseModel.
|
pure virtual |
Tell if numeric are handled as strings.
IlTrue
if numeric data is to be handled as strings, or IlFalse
if it is to be handled as double
.For more information about how to manage numeric data, see the section "Numeric As String" in the Rogue Wave DB Link User's Manual.
Implemented in IldBaseModel.