Wednesday, May 27, 2015

Object-Oriented Programming Concepts

Hello Dear readers,

I will start to explain oop from the begining till the end, let us to start

Object-Oriented Programming Concepts

If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language.

What Is an Object?

An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. This lesson explains how state and behavior are represented within an object, introduces the concept of data encapsulation, and explains the benefits of designing your software in this manner.

What Is a Class?

A class is a blueprint or prototype from which objects are created. This section defines a class that models the state and behavior of a real-world object. It intentionally focuses on the basics, showing how even a simple class can cleanly model state and behavior.

What Is Inheritance?

Inheritance provides a powerful and natural mechanism for organizing and structuring your software. This section explains how classes inherit state and behavior from their superclasses, and explains how to derive one class from another using the simple syntax provided by the Java programming language.

What Is an Interface?

An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior published by that interface. This section defines a simple interface and explains the necessary changes for any class that implements it.

What Is a Package?

A package is a namespace for organizing classes and interfaces in a logical manner. Placing your code into packages makes large software projects easier to manage. This section explains why this is useful, and introduces you to the Application Programming Interface (API) provided by the Java platform.

Questions and Exercises: Object-Oriented Programming Concepts

Use the questions and exercises presented in this section to test your understanding of objects, classes, inheritance, interfaces, and packages.

What is the difference between CALL_FORM, NEW_FORM and OPEN_FORM?

Hello my readers, 

Here i will explain the difference between call,new,open form
 
CALL_FORM: start a new form and pass control to it. The parent form will be suspended until the called form is terminated. user can not navigate to parent form until child form is open.
NEW_FORM: terminate the current form and replace it with the indicated new form. The old form's resources (like cursors and locks) will be released. parent form will be closed.
OPEN_FORM: Opens the indicated new form without suspending or replacing the parent form.user can navigate between parent and child forms.

SQL*Module Messages (MOD)

MOD-00001 unable to open file string
Cause: SQL*Module was unable to open a temporary file for internal use. There might be insufficient disk space, too many files, or read-only protection on the output directory.
Action: Check that there is enough disk space, that the limit for open files is set high enough (check with the system manager) and that protection on the directory allows opening a file for writing.

MOD-00002 invalid syntax at column number in line number of file string
Cause: There is a syntax error in the SQL statement or the statement is not properly terminated in the module file.
Action: Correct the syntax of the SQL statement. If the error occurred at the end of the input file, check that the last SQL statement is properly terminated.

MOD-00003 invalid SQL Identifier at column number in line number of file string
Cause: The symbol in a SQL descriptor is invalid.
Action: Check the statement syntax and spelling of the identifier and check that a reserved word was not accidentally used. If necessary, define the identifier in the declaration section of the module file.

MOD-00004 unsupported datatype in line number of file string
Cause: A host variable defined in the procedure definition of the module file has an unsupported datatype or has a scale or precision outside the supported range.
Action: Redefine the host variable using a supported datatype. Check that the scale and precision of a numeric variable are in the accepted range.

MOD-00005 invalid include file name at column number in line number of file string

MOD-00006 invalid host variable at column number in line number of file string
Cause: A host variable used in SQL statement was not defined in the procedure definition or has an unsupported datatype.
Action: Declare the host variable in the procedure definition of the module file, making sure it has one of the supported datatypes.

MOD-00007 unable to open a cursor at line number in file string
Cause: The syntax in the SQL statement is faulty. The module compiler was expecting a host variable, but found something else.
Action: Check the syntax and the spelling, then correct the SQL statement.

MOD-00008 unable to open include file "string" at line number in file string

MOD-00009 unable to open input file "string"
Cause: SQL*Module is not able to open the input file that was specified with the INAME option. This error can result from any of the following:
  • The file does not exist.
  • The file exists, but in a directory not on the path specified.
  • You do not have the permissions or access rights required to read the file.
Action: Check that the appropriate permission to read the file has been granted. Check that the name and directory hierarchy have been specified correctly. Rerun the compiler.

MOD-00010 unable to open listing file "string"
Cause: SQL*Module is not able to create the listing output file. This usually happens when write permissions do not exist on the current directory or on the directory specified for the LNAME option. It can also happen if the name or directory path is not legal or a directory on the path does not exist.
Action: Check the permissions on the specified path and file, or on the current directory if the LNAME option is not used.

MOD-00011 unable to open output file "string"
Cause: SQL*Module is not able to create an output file, such as the specification file or the output code file. This usually happens when write permissions on the current directory or on the directory specified for the ONAME or SNAME options do not exist. It can also happen if the name or directory path is not legal or a directory on the path does not exist.
Action: Check the permissions on the specified path and file, or on the current directory if the ONAME or SNAME options are not used.

MOD-00012 unable to parse statement at line number in file string
Cause: This is caused by a syntax error in the Module Language file. For example, if the SQL statement
SELECT ename INTO :name FORM emp WHERE ...

is in a module procedure, this message is raised. This message is not triggered by semantic errors. See MOD-00075.
Action: Correct the syntax error, then recompile.

MOD-00013 expected "string", but found "string" at line number in file string
Cause: The syntax in a SQL statement is faulty. The module compiler found an unexpected or illegal token.
Action: Check the syntax and the spelling, then correct the SQL statement.

MOD-00014 unable to obtain bind variables at line number in file string
Cause: The module compiler was unable to find information about an input host variable (bind variable) used in a SQL statement.
Action: Check that the input host variable is declared in the procedure definition of the module file and used properly in the SQL statement.

MOD-00015 Oracle Error: string
Cause: This message results from an internal error: an invalid value for the mode of a bind variable.
Action: Contact Oracle Support Services.

MOD-00016 out of space - unable to allocate number bytes
Cause: SQL*Module could not allocate enough memory to run or to perform some required action.
Action: Try killing some non-essential processes, then rerunning SQL*Module. On some operating systems, there may be a quota for the amount of memory the processes can allocate. See the system administrator. If necessary, increase memory for the machine.

MOD-00017 unable to connect to Oracle with "string:string/string". Oracle error number: number
Cause: The database connection or the username or the password that was specified was not correct. This message can result from an incorrect command-line specification or an incorrect specification of the username and/or password in the module AUTHORIZATION clause.
Action: Look up the error number in the ORA message chapters of this manual for more specific information on the failure. Correct the identifiers, then rerun SQL*Module.

MOD-00018 unable to disconnect from Oracle
Cause: An Oracle connection error occurred while the module was trying to log off, probably because Oracle has been shut down.
Action: Check that Oracle is available, then retry.

MOD-00019 indicator variable "string" has wrong type or length at line number in file string
Cause: An indicator variable was not declared in the procedure definition as a 2-byte integer. Indicator variables must be defined as 2-byte integers.
Action: Redefine the indicator variable as a 2-byte integer.

MOD-00020 option "string" not legal as EXEC ORACLE OPTION
Cause: A precompiler option was specified inline in an EXEC ORACLE statement. Some options can be specified only on the command line. For example, INAME cannot be specified inline.
Action: Respecify the precompiler option on the command line, instead of in an EXEC ORACLE statement. To see an online display of the precompiler options, enter the precompiler command (with no options) at the operating-system prompt.

MOD-00021 ambiguous option "string"
Cause: The name of module command line option is used ambiguously.
Action: Respecify the full option name or an unambiguous abbreviation. To see an online display of module options, enter the MODADA command (with no options) at the operating system prompt.

MOD-00022 invalid operand "string" for option "string"
Cause: The value specified for the module option is incorrect. That value is not appropriate for this module option.
Action: Respecify the option value appropriately.

MOD-00023 invalid option "string"
Cause: The module compiler found an invalid module option name. Some possible causes follow:
  • The option name is misspelled.
  • The specified option does not exist.
  • The equal sign (=) between the option name and value is missing or has space around it.
Action: Check that the option exists and that its name is spelled correctly. To see an online display of the module options, enter the MODADA command (with no options) at the operating system prompt. Also check there is an equal sign between the option name and value.

MOD-00024 missing operand for option "string"
Cause: No value was specified for a module option. Either the value is missing or there is space around the equal sign.
Action: Check that a value for each option has been specified and there is no space around the equal sign.

MOD-00025 unable to create access module
Cause: The module was unable to open the output file specified in the module option.
Action: Check that the search path to the file is correct, that sufficient privileges have been granted to access the file, and it is not locked by another user. Also check there is enough disk space and that the limit for open files is set high enough (check with the system manager).

MOD-00026 no host language specified
Cause: The host language name is not specified in the LANGUAGE clause of the module file.
Action: Specify Ada (case is not significant) for the LANGUAGE clause.

MOD-00027 no input file name specified
Cause: The STORE_PACKAGE=YES option was entered, but an input file using the INAME option was not specified.
Action: Use INAME on the command line.

MOD-00028 array host variable is illegal in this SQL statement
Cause: A host variable used in a SQL statement was not declared in the procedure definition or has an unsupported datatype.
Action: Declare the host variable in the procedure definition, making sure it has one of the supported datatypes.

MOD-00029 VARCHAR string at number is larger than 65533 line number in file string
Cause: The declared size of VARCHAR host variable exceeds the module limit of 65533 bytes.
Action: Check the declarations, making sure the size of each VARCHAR variable does not exceed the limit of 65533 bytes.

MOD-00030 both CURSOR and STATEMENT have AT clauses at line number of file string.
Cause: Two AT clauses, one in a DECLARE STATEMENT statement, the other in a DECLARE CURSOR statement, pertain to the same SQL statement. The AT clause may be specified with either DECLARE STATEMENT or DECLARE CURSOR, but not with both.
Action: Remove the AT clause from one of the statements.

MOD-00031 error at line number, column number. PLS-number: string
Cause: The module found an error in a SQL statement or PL/SQL block.
Action: Refer to the indicated PL/SQL error message to correct the SQL statement or PL/SQL block.

MOD-00032 illegal syntax, PL/SQL not allowed! Found statement at line number of file string.
Cause: The module found a PL/SQL block when expecting a SQL statement.
Action: Rewrite the statement using SQL syntax by replacing PL/SQL block.

MOD-00033 Ireclen exceeded. Line number in file string truncated.
Cause: While reading the input file, the module found a line longer than IRECLEN.
Action: Either shorten the input line or specify a larger IRECLEN value on the command line.

MOD-00034 insufficient authorization to run string
Cause: The authorization or license to run the MODADA compiler has expired.
Action: Call Oracle Support Services for assistance.

MOD-00035 your string authorization is about to expire
Cause: The authorization or license to run the MODADA compiler is about to expire.
Action: Call Oracle Support Services for assistance.

MOD-00036 internal programming exception
Cause: An internal error occurred.
Action: Contact Oracle Support Services.

MOD-00037 end of SQL statement or PL/SQL block not found
Cause: The module expected to find a statement terminator at the end of SQL statement or PL/SQL block but found something else. This can happen if tabs were embedded in the module file.
Action: If tabs are embedded in the source code, replace them with spaces. Check the statement syntax and check that each SQL statement has a terminator.

MOD-00038 module name required when output language is Ada
Cause: A MODULE clause was not specified in the module source file, or a name for the module was not provided.
Action: Specify the module name in the module file.

MOD-00039 unable to open specifications file "string"
Cause: SQL*Module is not able to create the specifications (header) output file. This usually happens when write permissions on the current directory or on the directory specified for the SNAME option do not exist. It can also happen if the name or directory path is not legal, a directory on the path does not exist, or the disk or file system is full.
Action: Check the permissions on the specified path and file or on the current directory if the SNAME options are not used. Check that the disk or file system is not full.

MOD-00040 no output language specified; compilation aborted
Cause: The LANGUAGE clause is not specified in the module source file.
Action: Specify the language clause in the module file.

MOD-00041 ANSI violation at line number, column number: string
Cause: FIPS=YES was specified, and part of the module code was not compliant with the ANSI SQL92 Entry Level standard.
Action: Specify FIPS=NO (the default) or correct the code.

MOD-00042 cannot declare cursor "string" more than once
Cause: The cursor named in the message was declared more than once in the module file.
Action: Check that each cursor names (not just in the module file, but in the entire application) is unique.

MOD-00043 cannot declare procedure "string" more than once
Cause: A procedure named X was declared more than once in the module file.
Action: Check that each procedure name (not just in the module file, but in the entire application) is unique.

MOD-00044 cannot declare parameter "string" in procedure "string" more than once
Cause: In the procedure named in the message, a parameter was declared with a name that duplicates another parameter's name.
Action: Check that each parameter name in a procedure is unique.

MOD-00045 a character string length of number is illegal
Cause: For a char[n] host variable, a length of less than 2 characters was specified. The length must be at least 2 characters.
Action: Correct the declaration so that it specifies the length of at least 2 characters.

MOD-00046 cursor "string" has not been declared
Cause: In the module file, an OPEN, FETCH, or CLOSE was attempted on a cursor that had not yet been declared.
Action: Insert an appropriate cursor declaration in the module file. Remember that cursors must be declared in the file before they are acted upon.

MOD-00047 an open statement already exists for cursor "string"
Cause: More than one procedure in this module contains an OPEN command on the named cursor.
Action: Remove one of the OPEN commands, as there is no need for redundancy.

MOD-00048 cursor "string" was never opened.
Cause: No OPEN command exists in the module for the cursor named in this message.
Action: Add an OPEN command or remove the cursor if it is not needed.

MOD-00049 unable to initialize PL/SQL
Cause: This message usually results when SQL*Module cannot connect to the database, using the username and password mentioned either in the module's AUTHORIZATION clause or on the command line with the USERID option.
Action: If connection is made using Net8, check that a listener process is running and that the service name specified in the AUTHORIZATION clause or on the command line is in the TNSNAMES.ORA file. If the connect parameters are correct and this problem persists, contact Oracle Support Services.

MOD-00050 formal parameter "string" is not used in procedure "string"
Cause: A formal parameter was declared in a procedure, but never used.
Action: Remove the parameter declaration or use it in the procedure.

MOD-00051 invalid reference mode specified for parameter "string"
Cause: The mode of this parameter is illegal. The mode should be one of IN, OUT, or IN OUT.
Action: Correct the reference mode to one of IN, OUT, or IN OUT appropriately.

MOD-00052 STORE_PACKAGE database does not match connection host
Cause: The module was not able to store the package in the database.

MOD-00053 duplicate macro definition does not match

MOD-00054 reference "string" is not a valid cursor reference
Cause: An attempt was made to OPEN a cursor that had not been declared.
Action: Declare the cursor or remove the erroneous reference to it.

MOD-00055 preprocessor directive is not understood

MOD-00056 array bound must be greater than 0
Cause: Incorrect array index was specified.
Cause: Respecify the array index by making sure that the index must be greater than 0.

MOD-00057 cannot find macro's argument list

MOD-00058 wrong number of arguments in macro invocation

MOD-00059 INTO variable "string" is not listed as a formal parameter
Cause: The target of an INTO clause in a SELECT statement is not a parameter of the procedure.
Action: Declare the parameter using the correct datatype in the procedure's parameter list.

MOD-00060 PL/SQL error in compiling package specification
Cause: A semantic error occurred in the PL/SQL parse phase when running SQL*Module.
Action: Check that all database objects are valid. To get more information, rerun SQL*Module with OUTPUT=PACKAGE, and check the output PL/SQL code specification file (it has a .pks extension). See the PL/SQL User's Guide and Reference for more information.

MOD-00061 PL/SQL error in compiling package body
Cause: A semantic error occurred in the PL/SQL parse phase when running SQL*Module.
Action: Check that all database objects are valid. To get more information, rerun SQL*Module with OUTPUT=PACKAGE, and check the output PL/SQL code file (it has a .pkb extension). See the PL/SQL User's Guide and Reference for more information.

MOD-00062 host variable for indicator is not recognized
Cause: A host variable that was used as an indicator variable was not declared.
Action: Declare the host variable or, if possible, remove the indicator variable from the SQL statement.

MOD-00063 procedure string, parameter string: illegal interface type "string"
Cause: When attempting to generate an interface procedures (stubs) file, the WITH INTERFACE PROCEDURE clause in the referenced stored package or stored procedure contained a parameter having an illegal datatype.
Action: Correct the datatype. Datatypes in a WITH INTERFACE clause must be SQL datatypes, not PL/SQL datatypes.

MOD-00064 procedure string: extra parameter "string" in interface
Cause: An unused parameter was declared in the WITH INTERFACE clause of a stored package or a stored procedure.
Action: Correct the WITH INTERFACE clause in the package.

MOD-00065 interface definition missing for procedure string
Cause: An attempt was made to generate stubs for a package that does not contain a WITH INTERFACE clause for one or more procedures.
Action: Add the WITH INTERFACE clause to the package specification.

MOD-00066 unable to load package "string" from database
Cause: The package name that was specified using the PNAME option is not correct, or SQL*Module could not access the database schema required.
Action: Check that the specified package exists and has a valid status. Check the STATUS column of the USER_OBJECTS table for that schema to check that the package is valid.

MOD-00067 package name is required but not specified
Cause: The options and values RPC_GENERATE=YES and STORE_PACKAGE=YES were specified, but a package name using the PNAME option was not specified.
Action: Add the PNAME option.

MOD-00068 could not find or open system configuration file
Cause: This is a warning message. SQL*Module is not able to find the system configuration file or is not able to open the file. The location of the system configuration file is system specific. See your operating system-specific documentation for the location on your system.
Action: Check that the file exists and that read permission or the appropriate access rights are set for it. The file must exist to avoid this warning message; however, it can be empty.

MOD-00069 Oracle error number while attempting to store package
Cause: SQL*Module's attempt to store the package in the database failed.
Action: Look up the error number in this manual and correct the problem.

MOD-00070 procedure string interface is missing declaration for string
Cause: An indicator variable was specified in the WITH INTERFACE clause, but the associated main variable was not declared there.
Action: Modify the WITH INTERFACE clause. Either remove the indicator variable or declare a host variable for it.

MOD-00071 PNAME option is required but not set
Cause: The name of a package stored in the database was not mentioned. This is required to generate stubs out of stored packages.
Action: Specify the name of the package stored in the database.

MOD-00072 PNAME option is specified but not meaningful
Cause: The PNAME option was used when there was no need for it. The PNAME option is only required when you specify RPC_GENERATE, STORE_PACKAGE, or both.
Action: Correct the command line.

MOD-00073 INAME option is specified but not meaningful
Cause: The INAME option was used when it was not required. For example, INAME is not required when RPC_GENERATE=YES and the PNAME option are specified.
Action: Do not use the INAME option.

MOD-00074 ONAME option is specified but not meaningful
Cause: The ONAME option was used when it was not required. For example, the ONAME option is not required when RPC_GENERATE=NO, and STORE_PACKAGE=YES, or the OUTPUT values list does not contain the CODE value.
Action: Do not use the ONAME option.

MOD-00075 error at line number. PLS-number: string
Cause: A semantic error occurred in the PL/SQL parse phase when running SQL*Module.
Action: Check that all database objects are valid. To get more information, rerun SQL*Module with OUTPUT=PACKAGE, and check the output PL/SQL code file (it has a .pkb extension). See the PL/SQL User's Guide and Reference for more information.

MOD-00076 ANSI violation at line number. PLS-number: string
Cause: FIPS=YES was specified and part of the module code is not compliant with the ANSI SQL92 Entry Level standard.
Action: Specify FIPS=NO (the default) or correct the code.

MOD-00077 mandatory status parameter, such as SQLCODE or SQLSTATE,is missing
Cause: Include a status parameter -- SQLCODE, SQLSTATE, or both -- in every parameter definition.
Action: Include SQLCODE or SQLSTATE.

MOD-00078 must specify a user if generating stubs from stored package
Cause: Because no USERID was specified, SQL*Module cannot connect to the server to create stubs (an interface procedures file) from the stored package.
Action: Specify the service name (if not connecting to the default database), and the username and password. Do this either on the command line or in a configuration file.

MOD-00079 SQLCHECK must be SEMANTICS when RPC=yes
Cause: SQLCHECK=SYNTAX (or SQLCHECK=NONE) cannot be specified when creating a stubs file.
Action: Remove the SQLCHECK=SYNTAX or SQLCHECK=NONE specification from the command line or the configuration file.

MOD-00080 error extracting stored package source
Cause: OUTPUT=PACKAGE was requested on the command line or in a configuration file, and a package of the name specified does not exist in the schema or is marked as INVALID.
Action: Check that the named package exists and is valid.

MOD-00081 failed assertion
Cause: Some part of the input to SQL*Module caused an error or warning condition. This message always follows a specific error or warning message.
Action: No action required for this message. Correct the previous errors.

MOD-00082 [compiling package body...]
Cause: This is an informational message.
Action: No action is required.

MOD-00083 [package body compiled]
Cause: This is an informational message.
Action: No action is required.

MOD-00084 [compiling package specification...]
Cause: This is an informational message.
Action: No action is required.

MOD-00085 [package specification compiled]
Cause: This is an informational message.
Action: No action is required.

MOD-00086 error: could not install username; aborted...
Cause: The server rejected a username.
Action: If the username is valid, contact Oracle Support Services.

MOD-00087 [storing package in dB]
Cause: This is an informational message.
Action: No action is required.

MOD-00088 feature not implemented yet
Cause: SQL*Module encountered a SQL statement that it can compile, but that uses a feature not yet implemented.
Action: Contact Oracle Languages Product Management.

MOD-00089 in procedure string: string
Cause: This is an informational message.
Action: No action is required.

MOD-00090 in cursor string : string
Cause: This is an informational message.
Action: No action is required.

MOD-00091 [generating RPC calls to stored package...]
Cause: This is an informational message.
Action: No action is required.

MOD-00092 [RPC calls generated]
Cause: This is an informational message.
Action: No action is required.

MOD-00093 SNAME option is specified but not meaningful
Cause: The SNAME option was used when it was not required. For example, no SNAME option is required if the values list of the OUTPUT option does not include the value SPECIFICATION.
Action: Do not use the SNAME option.

MOD-00094 extension in PNAME option is specified but not meaningful
Cause: A filename extension was included in the value of a PNAME option. Packages are database objects, not files.
Action: Remove the extension.

MOD-00095 datatype "string" is not valid for this host language.
Cause: A datatype was used that is not supported for the host language. For example, NUMERIC is not a supported datatype for Ada and C.
Action: Refer to your language-specific Precompiler Programmer's Guide for a list of the datatypes supported in each host language.

MOD-00096 LNAME option is specified but not meaningful
Cause: The OUTPUT option list does not contain the value LIST.
Action: Add LIST to the list of values of the OUTPUT option.

MOD-00097 with-interface must be specified for this host language
Cause: A PL/SQL package or function specification did not have a WITH INTERFACE clause. Currently, MODADA requires the WITH INTERFACE clause to be present in order to create calls to a PL/SQL function or package.
Action: Rewrite PL/SQL package or function specification to include a WITH INTERFACE clause. Alternatively, write a PL/SQL package or function specification which has a WITH INTERFACE clause and have it call the original PL/SQL package.

MOD-00098 with-interface may only be defaulted when bind=late
Cause: A Command line option, "bind=early" was specified while creating calls to a PL/SQL package or function without a WITH INTERFACE clause.
Action: Change the command line option to "bind=late", or include a WITH INTERFACE clause in the PL/SQL specification (see error 97 action).

MOD-00099 type string is invalid when storing a module, store=yes
Cause: The module contained a type for which there is currently no equivalent PL/SQL type; it may not be stored in the database.
Action: Set the command line option to STORE=NO or move the procedures containing the offending type to another module and compile that module with STORE=NO.

SQL Runtime Messages (SQL)

SQL-02100 Out of memory (i.e., could not allocate)
Cause: SQLLIB was unable to allocate enough memory to execute the program.
Action: Allocate more memory to the user session, then rerun the program. If the error persists, call Oracle Support Services for assistance.

SQL-02101 Inconsistent cursor cache. Unit cursor/global cursor mismatch
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02102 Inconsistent cursor cache. No global cursor entry.
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02103 Inconsistent cursor cache. Out of range cursor cache reference
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02104 Inconsistent host cache. No cursor cache available
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02105 Inconsistent cursor cache. Global cursor not found
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02106 Inconsistent cursor cache. Invalid Oracle cursor number
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02107 Program too old for runtime library; please re-precompile it
Cause: The program was precompiled by an older version of the Oracle Precompilers, which is incompatible with this release of SQLLIB.
Action: Precompile the program with a newer version of the Oracle Precompilers.

SQL-02108 Invalid descriptor passed to run-time library
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02109 Inconsistent host cache. Host reference is out of range
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02110 Inconsistent host cache. Invalid host cache entry type
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02111 Heap consistency error
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02112 SELECT..INTO returns too many rows
Cause: A SELECT...INTO statement returned more rows than can be stored in the host variable provided.
Action: There are three possible solutions:
  • Use the precompiler option SELECT_ERROR=NO.
  • Declare a host variable with a larger array dimension.
  • Declare a cursor or cursor variable for the select statement.

SQL-02113 Unable to open message file
Cause: SQLLIB was unable to find or open the SQLLIB message file, SQL*.MSB.
Action: Check that this file exists in the MESG directory and that it is readable.

SQL-02114 Invalid SQL Cursor usage: trying to CLOSE a CLOSEd cursor
Cause: An attempt was made to CLOSE a cursor that was already CLOSEd with MODE={ANSI|ANSI14}. A CLOSEd cursor can be re-CLOSEd only when MODE={ORACLE|ANSI13}.
Action: When MODE={ANSI|ANSI14}, verify that a cursor is not already CLOSEd before trying to CLOSE it. Specify MODE={ORACLE|ANSI13} if a CLOSEd cursor is to be re-CLOSEd.

SQL-02115 Code interpretation problem -- check COMMON_NAME usage
Cause: With PRO*FORTRAN, this error occurs if the precompiler option COMMON_NAME is specified incorrectly. With other Oracle Precompilers, this error occurs when the precompiler cannot generate a section of code.
Action: With Pro*FORTRAN, when using COMMON_NAME to precompile two or more source modules, make sure to specify a different common name for each module. With other Oracle Precompilers, if the error persists, call Oracle Support Services for assistance.

SQL-02116 FATAL ERROR: Reentrant code generator gave invalid context
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

SQL-02117 Invalid SQL Cursor usage: trying to OPEN an OPENed cursor
Cause: An attempt was made to OPEN a cursor that was already OPENed with MODE={ANSI|ANSI14|ANSI13}. An open cursor can be re-OPENed only when MODE=ORACLE.
Action: When MODE={ANSI|ANSI14|ANSI13}, verify that a cursor is not already OPENed before trying to OPEN it. Specify MODE=ORACLE if an OPENed cursor is to be re-OPENed.

SQL-02118 Invalid row for a WHERE CURRENT OF operation
Cause: An attempt was made to reference a nonexistent row using the CURRENT OF clause in an UPDATE or DELETE statement. This happens when no FETCH has been executed or when FETCH returns a "no data found" error that the program fails to trap.
Action: Check that the last cursor operation succeeded and that the current row of the cursor is valid. The outcome of a cursor operation can be checked in two ways: implicit checking with the WHENEVER statement or explicit checking of SQLCODE in the SQLCA.

SQL-02119 Invalid HSTDEF argument
Cause: A non-null pointer was given for a hstdef as the second argument to a call to SQLRCN when the first argument was also used. Either the first or the second argument to SQLRCN must be null.
Action: Pass a null pointer in either the first or second argument to SQLRCN.

SQL-02120 First and second arguments to SQLRCN both null
Cause: Both the first and second arguments to SQLRCN were null. An HSTDEF must be passed into SQLRCN in either the form of an OCI lda (first argument) or as an HSTDEF pointer itself (second argument).
Action: Pass in either an OCI LDA or an HSTDEF, but not both.

SQL-02121 Invalid host name
Cause: The host name passed into a SQLFCN call was not used in a previous call to SQLRCN.
Action: Use the same identifier used in the corresponding SQLRCN call.

SQL-02122 Invalid OPEN or PREPARE for this database connection
Cause: An attempt was made to execute an OPEN or a PREPARE statement using a cursor that is currently open for another database connection and, therefore, cannot be used for this connection.
Action: Close the cursor to make it available for this connection or use a different cursor for this connection.

SQL-02123 Context referenced in EXEC TOOLS GET CONTEXT statement not found
Cause: The context name given in the EXEC TOOLS GET CONTEXT statement was never stored with an EXEC TOOLS SET CONTEXT statement.
Action: Use the EXEC TOOLS SET CONTEXT statement to save any contexts to be retrieved later.

SQL-02124 NULL value returned by EXEC TOOLS statement
Cause: A NULL value was returned by EXEC TOOLS for a host variable that lacks an indicator variable. This error is returned only when MODE=ANSI. When MODE=ORACLE, although the value of the host variable is indeterminate, no error is generated.
Action: Associate an indicator variable with each host variable to which nulls might be returned.

SQL-02125 Connect error, can't get error text
Cause: No connection (not even to the default host) was available, so SQLLIB could not get the message text for the Oracle error that occurred. However, SQLLIB returns the Oracle error number, which can be used to look up the message.
Action: Look up the appropriate message in this manual, and follow the Cause and Action information provided.

SQL-02126 Count of array elements cannot be negative (i.e. < 0)
Cause: The precompiler found a negative number of array elements in the N or F element of the SQLDA (SQL Descriptor Area, which is used with dynamic SQL Method 4). Before executing the DESCRIBE statement, N must be set to the dimension of the descriptor arrays. After executing the DESCRIBE statement, N must be reset to the actual number of variables DESCRIBEd, which is stored in the F variable.
Action: Check that the N or F variables are set to non-negative values.

SQL-02127 Precompiler/SQLLIB version mismatch
Cause: The program was linked to an older version of SQLLIB, which is incompatible with this release of the Oracle Precompilers.
Action: Relink the program with a newer version of SQLLIB

SQL-02128 Sessions still exist, not logged off
Cause: A host was not removed ("logged off") from SQLLIB because XA still has sessions associated with that host.
Action: Before calling SQLXDH to drop a host, XA must either drop all sessions for that host or set the "doit_anyway" flag.

SQL-02129 Fetched number of bytes is odd.
Cause: The program tried to FETCH an invalid column value into a multi-byte NLS host variable. Specifically, the column did not contain valid double-byte data.
Action: Make sure the column contains only double-byte data. To verify this, use SQL*Plus or Server Manager.

SQL-02130 EXEC TOOLS interface is not available.
Cause: An attempt was made to link with a version of an Oracle tool that does not support the EXEC TOOLS interface. EXEC TOOLS interface.
Action: Either upgrade the Oracle tool, or use the EXEC IAF interface.

SQL-02131 Runtime context in use
Cause: Your application attempted to execute a SQL statement using a runtime context that is already in use.
Action: Rewrite the application to either wait for one thread to complete before executing another SQL statement with the same runtime context, or to allocate and use a separate runtime context for each thread.

SQL-02132 Unable to allocate runtime context sdfla asdjklfajs jfja ajsdf
Cause: An attempt to allocate a runtime context failed.
Action: This error typically occurs when the process memory is low. Allocate more memory and run the application again.

SQL-02133 Unable to initialize process for use with threads
Cause: This is an internal error.
Action: Call Oracle Support Services.

SQL-02134 Invalid runtime context
Cause: The runtime context associated with this statement has not been properly allocated.
Action: Rewrite the application to execute the EXEC SQL CONTEXT ALLOCATE statement before executing any SQL statements.

SQL-02135 Unable to initialize date format using supplied mask
Cause: The runtime library was unable to issue a set date format statement with the date format mask supplied.
Action: Check the validity of the date format and correct if necessary. Check the ORA error number for further information.

SQL-02136 Invalid NCHAR character set id
Cause: An attempt was made to bind or define an NCHAR host variable, and the NLS_NCHAR variable was not set correctly.
Action: Set the NLS_NCHAR environment variable to a valid fixed width character set id and run the application again.

SQL-02137 Multi-threaded agent with no RETURNING clause present
Cause: The EXEC SQL REGISTER CONNECT statement does not contain a RETURNING clause and the agent is running in threaded mode.
Action: Re-code the statement to use a RETURNING clause that references a declared SQL_CONTEXT host variable.

SQL-02138 No external procedure context exists
Cause: The external procedure context passed in the EXEC SQL REGISTER CONNECT statement is not valid.
Action: Ensure that you have done the following:
  1. Created the PL/SQL procedure/function with a CONTEXT parameter.
  2. Included OCIExtProcContext in the formal parameter list of the external procedure.
  3. Correctly passed the OCIExtProcContext to the EXEC SQL REGISTER CONNECT statement.


Cause: The call to OCIExtProcGetEnv failed.
Action: Ensure that the OCIExtProcContext that the external procedure has been created with a CONTEXT parameter and that this context is correctly referenced in the EXEC SQL REGISTER CONNECT statement.

SQL-02140 An unnamed connection already exists
Cause: An attempt to register an external procedure context was made when an unnamed connection already exists for the runtime context.
Action: Do not attempt to establish any connections with the EXEC SQL CONNECT statement from external procedures.

SQL-02141 Collection descriptor has not been allocated
Cause: An unallocated collection descriptor was referenced in a COLLECTION SET or COLLECTION GET statement.
Action: Allocate the collection descriptor with the EXEC SQL ALLOCATE statement (for example, EXEC SQL ALLOCATE :coldesc_p;).

SQL-02142 Collection is NULL
Cause: The collection referenced in an EXEC SQL COLLECTION statement is null.
Action: Check the status of the associated indicator variable prior to executing an EXEC SQL COLLECTION statement.

SQL-02143 Target object has not been properly allocated
Cause: An attempt was made to retrieve elements from a collection into an unallocated object pointer.
Action: Allocate the object pointer with the EXEC SQL ALLOCATE statement.

SQL-02144 Invalid ANSI dynamic usage
Cause: An ANSI allocate, deallocate, get or set descriptor statement was encountered when dynamic option was not set.
Action: Precompile your source with option DYNAMIC=ANSI.

SQL-02145 Invalid dynamic descriptor
Cause: An attempt to access an unallocated or invalid descriptor was encountered.
Action: For ANSI descriptors, check that descriptor name is valid and descriptor has been allocated and not previously deallocated. Or if using Oracle descriptors (SQLDA) with MODE=ANSI also use DYNAMIC=ORACLE.

SQL-02146 Attempt to allocate an existing descriptor
Cause: An attempt allocated a descriptor which has previously been allocated was encountered.
Action: Use a unique descriptor name or deallocate the descriptor before attempting to reallocate it.

SQL-02147 ANSI Dynamic occurrence value out of range
Cause: The value clause in a dynamic GET or SET statement is less than one or greater than MAX given for descriptor allocation.
Action: Supply a number for the VALUE clause between 1 and the MAX occurrences supplied when the descriptor was allocated.

SQL-02148 ANSI Dynamic count value out of range
Cause: The count in a dynamic GET or SET statement is less than one or greater than MAX given for descriptor allocation.
Action: Supply a number for the COUNT clause between 1 and the MAX occurrences supplied when the descriptor was allocated.

SQL-02149 ANSI Dynamic insufficient item descriptor areas
Cause: The SQL statement being described contains more output items (or columns) than were allocated in the descriptor.
Action: Increase the MAX number of occurrences when allocating the descriptor.

SQL-02150 Encountered zero length in ANSI dynamic SET statement
Cause: An invalid length of zero was encountered in an ANSI dynamic statement.
Action: Set the length to a non-zero value.

SQL-02151 Invalid host variable for exact numeric SET statement item
Cause: An host variable with an invalid type or length was used to get or set an exact numeric item in an ANSI dynamic statement.
Action: Make sure your host variable is an int or short for C or for COBOL, S9(4) or S9(9) binary/comp/display sign leading separate.

SQL-02152 Invalid numeric variable for use in an array GET/SET statement
Cause: An host variable with type other than int or short for C or S9(4) or S9(9) binary or comp was used for an exact numeric with and array size > 1.
Action: Use only int or short for C or S9(4) or S(9) binary or comp for COBOL when supplying an exact numeric in conjunction with the for clause to indicate arrays. Specifically, display sign leading separate is not allowed in this context.

SQL-02153 Invalid character variable for use in a GET/SET statement
Cause: An host variable with type other than character, string or varchar was found as an item name (other than DATA item) in an ANSI Dynamic GET or SET descriptor statement.
Action: Host variable types for character items (other than the DATA item) in ANSI dynamic GET or SET descriptor statements must not be of type LONG or LONG VARCHAR. Redeclare the variable to be character, string or varchar type.

SQL-02154 Invalid or unset data type for host variable in ANSI Dynamic
Cause: An ANSI Dynamic SET statement with item name DATA was encountered with out a valid TYPE having been previously set and option MODE=ANSI was used.
Action: With MODE=ANSI, you must set the TYPE before setting the DATA. Issue a SET statement with correct item TYPE or, for output issue a DESCRBE to set the item type. Or use mode=oracle which allows the type to default to the type of the bind/define host variable.

SQL-02155 Date Time Interval only valid with Dynamic=ANSI
Cause: An attempt to access the datetime interval code or precision was encountered when TYPE_CODE option not set to ANSI.
Action: Use precompiler option TYPE_CODE=ANSI to access the date time interval code or date time interval precision.

SQL-02156 Invalid type for Indicator or Returned Length
Cause: A host variable associated with the item Indicator or Returned Length must be of type short or s9(4) comp. If value semantics and scalar, they may also be gotten into display sign leading separate host variables.
Action: Use signed short for indicator, ref indicator and returned length, ref returned length host variables in C. For COBOL use s9(4) comp. for GETs only with non-arrays and you may use display sign leading separate host variables.

SQL-02157 Source or destination lob is invalid
Cause: One of the LOBs used in the LOB append call is invalid or possibly null.
Action: Make sure the LOBs used in the append call are non-null.