DEBUG package

  Related Topics 	  All Built-ins

Debug.Break

Debug.Getx

Debug.Interpret

Debug.Setx

Debug.Suspend


Debug.Break

  Examples	   Related Topics 	   All Built-ins

Description  Used to enter a breakpoint from within a debug trigger.

Syntax

Debug.Break  EXCEPTION;

Usage Notes  Debug.Break is very useful for creating conditional breakpoints.  When the exception is raised, control is passed to the Interpreter as if you had entered a breakpoint at the debug trigger location.


Debug.Break example

  Related Topics	   All Examples

 /*
** Create a breakpoint only when the value
** of 'my_sal' exceeds 5000
*/
IF Debug.Getn('my_sal') > 5000 THEN
  RAISE Debug.Break;
END IF;


Debug.Getx

  Examples	   Related Topics 	   All Built-ins

Description  Retrieve the value of the specified local variable.

Syntax

FUNCTION Debug.Getc
   (varname VARCHAR2)
RETURN VARCHAR2;

FUNCTION Debug.Getd
   (varname VARCHAR2)
RETURN DATE;

FUNCTION Debug.Geti
   (varname VARCHAR2)
RETURN PLS_INTEGER;

FUNCTION Debug.Getn
   (varname VARCHAR2)
RETURN NUMBER;

Parameters

varname	A VARCHAR2 or CHAR (Debug.Getc converts CHAR values to VARCHAR2), DATE, PLS_INTEGER, or NUMBER variable.
Usage Notes  This is useful when you want to determine a local's value from within a debug trigger.


Debug.Getx examples

  Related Topics	   All Examples

 /*
** Retrieve the value of the variable 'my_ename'
** and use it to test a condition
*/
IF Debug.Getc('my_ename') = 'JONES' THEN
  RAISE Debug.Break;
END IF;

You have a program unit foo that calls the subprogram bar.  That subprogram (bar) is also called by many other program units.  Consider the situation where procedure bar accepts the argument 'message' from the many procedures that call it.  Procedure foo passes a unique argument of 'hello world' to bar.  In this case, we could define a trigger that raises a breakpoint in procedure bar only when foo passes its argument:

PL/SQL> .TRIGGER PROC bar LINE 3 IS
      >BEGIN
      >  IF Debug.Getn('message') = 'hello world' THEN
      >    RAISE Debug.Break;
      >  END IF;
      >END;


Debug.Interpret

  Examples	   Related Topics 	   All Built-ins

Description  Executes the PL/SQL statement or Procedure Builder Interpreter command string contained in input as if it had been typed into the Interpreter.

Syntax

PROCEDURE Debug.Interpret
   (input VARCHAR2);

Parameters

input	A Procedure Builder command string.
Usage Notes  This is useful for automatically invoking Procedure Builder functions from a debug trigger.


Debug.Interpret examples

  Related Topics	   All Examples

 /*
** Execute the command SHOW STACK when
** a condition is met
*/
IF Debug.Getc('my_ename') = 'JONES' THEN
  Debug.Interpret('.SHOW LOCALS');
END IF;

You have a program unit foo that calls the subprogram bar.  That subprogram (bar) is also called by many other program units.  You want to create a breakpoint in bar, but you only want to enable the breakpoint when the subprogram is called from foo and not when it is called from other program units.

To do this, you need to perform the following steps:

1	Create a breakpoint in procedure bar where you want to suspend execution.

2	Disable the breakpoint you just created.

You can perform both steps 1 and 2 from within the Breakpoint dialog box.  Create a breakpoint with a breakpoint trigger in procedure foo that enables the first breakpoint we created in procedure bar.  For example:

PL/SQL>.BREAK PROC foo LINE 6 TRIGGER
      >BEGIN
      >  Debug.Interpret('.enable break 1');
      >  Debug.Interpret('.go');
      >END;

The following example creates a breakpoint which fires a trigger each time the breakpoint is hit.

PL/SQL> .break proc my_proc line 10 trigger
     +> DEBUG.INTERPRET('.SHOW LOCALS');


Debug.Setx

  Examples	   Related Topics 	   All Built-ins

Description  Set the value of a local variable to a new value.

Syntax

PROCEDURE Debug.Setc
   (varname  VARCHAR2,
    newvalue VARCHAR2);

PROCEDURE Debug.Setd
   (varname  VARCHAR2,
    newvalue DATE);

PROCEDURE Debug.Seti
   (varname  VARCHAR2,
    newvalue PLS_INTEGER);

PROCEDURE Debug.Setn
   (varname  VARCHAR2,
    newvalue NUMBER);

Parameters

varname	A VARCHAR2 or CHAR (Debug.Setc converts CHAR values to VARCHAR2), DATE, PLS_INTEGER, or NUMBER variable.
newvalue	An appropriate value for varname.
Usage Notes  This is useful when you want to change a local's value from a debug trigger.


Debug.Setx examples

  Related Topics	   All Examples

 /*
** Set the value of the local variable 'my_emp' from a
** Debug Trigger
*/
Debug.Setc('my_emp', 'SMITH');
/*
** Set the value of the local variable 'my_date' from a
** Debug Trigger
*/
Debug.Setd('my_date', '02-OCT-94');


Debug.Suspend

  Examples	   Related Topics 	   All Built-ins

Description  Suspends execution of the current program unit and transfers control to the Interpreter.

Syntax

PROCEDURE Debug.Suspend;


Debug.Suspend example

  Related Topics	   All Examples

 /*
** This example uses Debug.Suspend
*/
PROCEDURE proc1 IS
BEGIN
  FOR i IN 1..10 LOOP
    Debug.Suspend;
    Text_IO.Put_Line('Hello');
  END LOOP;
 END;


DDE package

  Related Topics 	  All Built-ins

DDE.App_Begin

DDE.App_End

DDE.App_Focus

DDE.DMLERR_Not_Supported

DDE.Execute

DDE.Getformatnum

DDE.Getformatstr

DDE.Initiate

DDE.IsSupported

DDE.Poke

DDE.Request

DDE.Terminate


DDE.App_Begin

  Examples	   Related Topics 	   All Built-ins

Description  Begins an application program and returns an application identifier.

Syntax

FUNCTION DDE.App_Begin
   (AppName VARCHAR2,
    AppMode PLS_INTEGER)
RETURN PLS_INTEGER;

Parameters

AppName	The application name.
AppMode	The application starting modes are: App_Mode_Normal    Start the application window in normal size. App_Mode_Minimized   Start the application window in minimized size. App_Mode_Maximized   Start the application window in maximized size.

Returns  An application identifier.

Usage Notes  The application name may contain a path.  If the application name does not contain a path, then the following directories are searched in the order shown below:

•	current directory

•	Windows directory

•	Windows system directory

•	directory containing the executable file for the current task

For AppName, the application program name may be followed by arguments, which should be separated from the application program name with a space.

The application may be started in either normal, minimized, or maximized size, as specified by AppMode.

The application identifier returned by DDE.App_Begin must be used in all subsequent calls to DDE.App_End and DDE.App_Focus for that application window.


DDE.App_Begin example

  Related Topics	   All Examples

 /*
** Start MS Excel with spreadsheet emp.xls loaded
*/
DECLARE
  AppID  PLS_INTEGER;
BEGIN
    AppID := DDE.App_Begin('c:\excel\excel.exe emp.xls',
     DDE.App_Mode_Minimized);
END;


DDE.App_End

  Examples	   Related Topics 	   All Built-ins

Description  Ends an application program started by Dde_App_Begin.

Syntax

PROCEDURE DDE.App_End
   (AppID PLS_INTEGER);

Parameters

AppID	The application identifier returned by DDE.App_Begin.
Usage Notes  The application may also be terminated in standard Windows fashion: for example, by double-clicking the Control menu.

You must have previously called DDE.App_Begin to start the application program in order to end it using DDE.App_End.


DDE.App_End example

  Related Topics	   All Examples

 /*
** Start Excel, perform some operations on the
** spreadsheet, then close the application.
*/
DECLARE
  AppID  PLS_INTEGER;
BEGIN
    AppID := DDE.App_Begin('c:\excel\excel.exe emp.xls',
    DDE.App_Mode_Normal);
  ...
   DDE.App_End(AppID);
END;


DDE.App_Focus

  Examples	   Related Topics 	   All Built-ins

Description  Activates an application program started by DDE.App_Begin.

Syntax

PROCEDURE DDE.App_Focus
   (AppID PLS_INTEGER);

Parameters

AppID	The application identifier returned by DDE.App_Begin.
Usage Notes  The application may also be activated in standard Windows fashion: for example, by clicking within the application window.

To activate an application program using DDE.App_Focus, you must have previously called DDE.App_Begin to start the application program.


DDE.App_Focus example

  Related Topics	   All Examples

 /*
** Start Excel, then activate the application window
*/
DECLARE
   AppID  PLS_INTEGER;
BEGIN
  AppID := DDE.App_Begin('c:\excel\excel.exe',
    DDE.App_Mode_Maximized);
  DDE.App_Focus(AppID);
END;


DDE.Execute

  Examples	   Related Topics 	   All Built-ins

Description  Executes a command string that is acceptable to the receiving server application.

Syntax

PROCEDURE DDE.Execute
   (ConvID  PLS_INTEGER,
    CmdStr  VARCHAR2,
    Timeout PLS_INTEGER);

Parameters

ConvID	The DDE Conversation identifier returned by DDE.Initiate.
CmdStr	The command string to be executed by the server.
Timeout	The timeout duration, in milliseconds.
Usage Notes  The value of CmdStr depends on what values are supported by the server application.

Timeout specifies the maximum length of time, in milliseconds, that this routine waits for a response from the DDE server application.  If you specify an invalid number (e.g., a negative number), then the default value of 1000 ms is used.


DDE.Execute example

  Related Topics	   All Examples

 /*
** Initiate Excel, then perform a recalculation
*/
DECLARE
  ConvID  PLS_INTEGER;
BEGIN
   ConvID := DDE.Initiate('EXCEL', 'abc.xls');
   DDE.Execute(ConvID, '[calculate.now()]', 1000);
END;


DDE.Getformatnum

  Examples	   Related Topics 	   All Built-ins

Description  Translates or registers a specified data format name and returns the numeric representation of the data format string.

Syntax

FUNCTION DDE.Getformatnum
   (DataFormatName VARCHAR2)
RETURN PLS_INTEGER;

Parameters

DataFormat-Name	The data format name string.
Usage Notes  DDE.Getformatnum converts a data format from a string to a number.  This number can be used in DDE.Poke and DDE.Request transactions to represent the DataFormat variable.

If the specified name has not been registered yet, then DDE.Getformatnum registers it and returns a unique format number.  This is the only way to use a format in a DDE.Poke or DDE.Request transaction that is not one of the predefined formats.


DDE.Getformatnum example

  Related Topics	   All Examples

 /*
** Get predefined format number for "CF_TEXT" (should
** return CF_TEXT=1) then register a user-defined
** data format called "MY_FORMAT"
*/
DECLARE
  FormatNum    PLS_INTEGER;
  MyFormatNum  PLS_INTEGER;
BEGIN
  FormatNum := DDE.Getformatnum('CF_TEXT');
  MyFormatNum := DDE.Getformatnum('MY_FORMAT');
END;


DDE.Getformatstr

  Examples	   Related Topics 	   All Built-ins

Description  Translates a data format number into a format name string.

Syntax

FUNCTION DDE.Getformatstr
   (DataFormatNum PLS_INTEGER)
RETURN VARCHAR2;

Parameters

DataFormat-Num	A data format number.
Returns  The string representation of the supplied data format number.

Usage Notes  DDE.Getformatstr returns a data format name if the data format number is valid.  Valid format numbers include the predefined formats and any user-defined formats that were registered with DDE.Getformatnum.


DDE.Getformatstr example

  Related Topics	   All Examples

 /*
** Get a data format name (should return the string
** 'CF_TEXT')
*/
DECLARE
  FormatStr  VARCHAR2(80);
BEGIN
  FormatStr := DDE.Getformatstr(CF_TEXT);
END;


DDE.Initiate

  Examples	   Related Topics 	   All Built-ins

Description  Opens a DDE conversation with a server application.

Syntax

FUNCTION DDE.Initiate
   (Service VARCHAR2,
    Topic   VARCHAR2)
RETURN PLS_INTEGER;

Parameters

Service	The server application's DDE Service code.
Topic	The topic name for the conversation.
Returns  A DDE Conversation identifier.

Usage Notes  The values of Service and Topic depend on the values supported by a particular DDE server application.  Service is usually the name of the application program.  For applications that operate on file-based documents, Topic is usually the document filename; in addition, the System topic is usually supported by each service.

The conversation identifier returned by DDE.Initiate must be used in all subsequent calls to DDE.Execute, DDE.Poke, DDE.Request, and DDE.Terminate for that conversation.

An application may start more than one conversation at a time with multiple services and topics, provided that the conversation identifiers are not interchanged.

Use DDE.Terminate to terminate the conversation.


DDE.Initiate example

  Related Topics	   All Examples

 /*
** Open a DDE Conversation with MS Excel on
** topic abc.xls
*/
DECLARE
  ConvID  PLS_INTEGER;
BEGIN
  ConvID := DDE.Initiate('EXCEL', 'abc.xls');
END;


DDE.IsSupported

  Examples	   Related Topics 	   All Built-ins

Description  Confirms that the DDE package is supported on the current platform.

Syntax

DDE.ISSUPPORTED

Returns  TRUE, if DDE is supported on the platform; FALSE if it is not.


DDE.IsSupported example

  Related Topics	   All Examples

/*
** Before calling a DDE object in platform independent code,
** use this predicate to determine if DDE is supported on the
** current platform.
*/
IF (DDE.ISSUPPORTED)THEN
. . . PL/SQL code using the DDE package
ELSE
. . . message that DDE is not supported
END IF;


DDE.DMLERR_Not_Supported

  Related Topics 	   All Built-ins

Description  This exception is raised if a call is made to the DDE package but DDE is not supported on the current software platform.

Syntax

DDE.DMLERR_NOT_SUPPORTED EXCEPTION;


DDE.Poke

  Examples	   Related Topics 	   All Built-ins

Description  Sends data to a server application.

Syntax

PROCEDURE DDE.Poke
   (ConvID     PLS_INTEGER,
    Item       VARCHAR2,
    Data       VARCHAR2,
    DataFormat PLS_INTEGER,
    Timeout    PLS_INTEGER);

Parameters

ConvID	The DDE Conversation identifier returned by DDE.Initiate.
Item	The data item name to which the data is to be sent.
Data	The data buffer to send.
DataFormat	The format of outgoing data.
Timeout	The time-out duration in milliseconds.
Usage Notes  The value of Item depends on what values are supported by the server application on the current conversation topic.

The predefined data format constants may be used for DataFormat.

A user-defined format that was registered with DDE.Getformatnum may also be used, provided that the server application recognizes this format.  The user is responsible for ensuring that the server application will process the specified data format.

Timeout specifies the maximum length of time, in milliseconds, that this routine waits for a response from the DDE server application.  If you specify an invalid number (e.g., a negative number), then the default value of 1000 ms is used.


DDE.Poke example

  Related Topics	   All Examples

 /*
** Open a DDE Conversation with MS Excel on topic
** abc.xls and end data "foo" to cell at row 2,
** column 2
*/
DECLARE
  ConvID  PLS_INTEGER;
BEGIN
  ConvID = DDE.Initiate('EXCEL', 'abc.xls');
  DDE.Poke(ConvID, 'R2C2', 'foo', DDE.CF_TEXT, 1000);
END;


DDE.Request

  Examples	   Related Topics 	   All Built-ins

Description  Requests data from a server application.

Syntax

PROCEDURE DDE.Request
   (ConvID     PLS_INTEGER,
    Item       VARCHAR2,
    Buffer     VARCHAR2,
    DataFormat PLS_INTEGER,
    Timeout    PLS_INTEGER);

Parameters

ConvID	The DDE Conversation identifier returned by DDE.Initiate.
Item	Is requested data item name.
Buffer	The result data buffer.
DataFormat	The format of the requested buffer.
Timeout	The timeout duration in milliseconds.
Usage Notes  The value of Item depends on what values are supported by the server application on the current conversation topic.

The user is responsible for ensuring that the return data buffer is large enough for the requested data.  If the buffer size is smaller than the requested data, the data is truncated.

The predefined data format constants may be used for DataFormat.

A user-defined format that was registered with DDE.Getformatnum may also be used, provided that the server application recognizes this format.  It is the user's responsibility to ensure that the server application will process the specified data format.

Timeout specifies the maximum length of time, in milliseconds, that this routine waits for a response from the DDE Server application.  If the user specifies an invalid number, such as negative number, then the default value of 1000 ms is used.


DDE.Request example

  Related Topics	   All Examples

 /*
** Open a DDE Conversation with MS Excel for Windows on
** topic abc.xls then request data from 6 cells
** between row 2, column 2 and row 3, column 4
*/
DECLARE
  ConvID   PLS_INTEGER;
  Buffer   VARCHAR2(80);
BEGIN
   ConvID := DDE.Initiate('EXCEL', 'abc.xls');
   DDE.Request (ConvID, 'R2C2:R3C4', Buffer, DDE.Cf_Text,
     1000);
END;


DDE.Terminate

  Examples	   Related Topics 	   All Built-ins

Description  Terminates the specified conversation with an application.

Syntax

PROCEDURE DDE.Terminate
    (ConvID PLS_INTEGER);

Parameters

ConvID	The conversation identifier.
Usage Notes  After the DDE.Terminate call, all subsequent calls to DDE.Execute, DDE.Poke, DDE.Request, and DDE.Terminate using the terminated conversation identifier will result in an error.

To terminate a conversation with a server application using DDE.Terminate, you must have used DDE.Initiate to start the conversation.


DDE.Terminate example

  Related Topics	   All Examples

 /*
** Open a DDE Conversation with MS Excel on topic
** abc.xls perform some operations, then terminate
** the conversation
*/
DECLARE
  ConvID	PLS_INTEGER;
BEGIN
  ConvID := DDE.Initiate('EXCEL', 'abc.xls');
  ...
  DDE.Terminate(ConvID);
END;


TOOL_ENV package

  Related Topics 	  All Built-ins

Tool_Env.Getvar


Tool_Env.Getvar

  Examples	   Related Topics 	   All Built-ins

Description  Provides a way to import an environment variable into a VARCHAR2 variable.

Syntax

PROCEDURE Tool_Env.Getvar
   (varname  VARCHAR2,
    varvalue VARCHAR2);

Parameters

varname	The name of the environment variable.
varvalue	The value of the environment variable.


Tool_Env.Getvar example

  Related Topics	   All Examples

 /*
** Retrieve the environment variable USER into a
** variable named :userid so you can use it in a
** connect string or other call.
*/
Tool_Env.Getvar('USER', :userid);


TOOL_ERR package

  Related Topics 	  All Built-ins

Tool_Err.Clear

Tool_Err.Code

Tool_Err.Encode

Tool_Err.Message

Tool_Err.Nerrors

Tool_Err.Pop

Tool_Err.Tool_Error

Tool_Err.Toperror


Tool_Err.Clear

  Related Topics 	   All Built-ins

Description  Discards all errors currently on the error stack.

Syntax

PROCEDURE Tool_Err.Clear;


Tool_Err.Code

  Examples	   Related Topics 	   All Built-ins

Description  Returns the error code for the ith error on the error stack (the default is the top-most error).  If there are no errors on the stack, zero is returned.

Syntax

FUNCTION Tool_Err.Code
   (i PLS_INTEGER := TOPERROR)
RETURN NUMBER;

Parameters

i	An integer that specifies an error on the error stack.
Returns  The error code of the error specified.


Tool_Err.Code example

  Related Topics	   All Examples

/*
** Check for unexpected error, disregard it,
** and print any other error.
*/
PROCEDURE check_err IS
BEGIN
  IF (TOOL_ERR.CODE != pkg_a.not_found) THEN
    TEXT_IO.PUT_LINE(TOOL_ERR.MESSAGE);
  END IF;
  TOOL_ERR.POP;
END;


Tool_Err.Encode

  Examples	   Related Topics 	  All Built-ins

Description   Given a prefix and an offset, constructs a unique error code for use within a package.

Note:  This is not a PL/SQL exception.

Syntax

FUNCTION Tool_Err.Encode
   (prefix VARCHAR2,
    offset PLS_INTEGER)
RETURN NUMBER;

Parameters

prefix	A string of five characters.
offset	An integer from 1 to 127.
Returns  An error code.


Tool_Err.Encode example

  Related Topics	   All Examples

/*
** Define a list of errors for a package
** called pkg_a.
*/
PACKAGE pkg_a IS
  not_found CONSTANT pls_integer := TOOL_ERR.ENCODE('pkg_a', 1);
  bad_value CONSTANT pls_integer := TOOL_ERR.ENCODE('pkg_a', 2);
  too_big   CONSTANT pls_integer := TOOL_ERR.ENCODE('pkg_a', 3);
  too_small CONSTANT pls_integer := TOOL_ERR.ENCODE('pkg_a', 4);
  . . .     /* Rest of pkg_a specification */
END;


Tool_Err.Message

  Examples	   Related Topics 	  All Built-ins

Description  Returns the formatted message associated with the ith error on the error stack (the default is the top-most error).

Syntax

FUNCTION Tool_Err.Message
   (i PLS_INTEGER := TOPERROR)
RETURN VARCHAR2;

Parameters

i	An integer that specifies an error on the error stack.
Returns  An error message.


Tool_Err.Message example

  Related Topics	   All Examples

/*
** Determine the number of errors
** on the stack.  Then, loop through stack,
** and print out each error message.
*/
PROCEDURE print_all_errors IS
  number_of_errors   PLS_INTEGER;
BEGIN
EXCEPTION
  WHEN OTHERS THEN
  number_of_errors := TOOL_ERR.NERRORS;
  FOR i IN 1..number_of_errors LOOP
    TEXT_IO.PUT_LINE(TOOL_ERR.MESSAGE(i-1));
  END LOOP;
END;


Tool_Err.Nerrors

  Examples	   Related Topics 	  All Built-ins

Description  Returns the number of errors currently on the error stack.

Syntax

FUNCTION Tool_Err.Nerrors
RETURN PLS_INTEGER;

Returns  The number of error on the error stack.


Tool_Err.Nerrors example

  Related Topics	   All Examples

/*
** Determine the number of errors
** on the stack.  Then, loop through stack,
** and print out each error message.
*/
PROCEDURE print_all_errors IS
  number_of_errors   PLS_INTEGER;
BEGIN
EXCEPTION
  WHEN OTHERS THEN
  number_of_errors := TOOL_ERR.NERRORS;
  FOR i IN 1..number_of_errors LOOP
    TEXT_IO.PUT_LINE(TOOL_ERR.MESSAGE(i-1));
  END LOOP;
END;


Tool_Err.Pop

  Examples	   Related Topics 	  All Built-ins

Description  Discards the top-most error on the error stack.

Syntax

PROCEDURE Tool_Err.Pop;


Tool_Err.Pop example

  Related Topics	   All Examples

/*
** Loop through each message in the stack,
** print it, then clear the top most error.
*/
BEGIN
  . . .

EXCEPTION
  WHEN OTHERS THEN
  FOR i IN 1..Tool_Err.Nerrors LOOP
    TEXT_IO.PUT_LINE(TOOL_ERR.MESSAGE);
    TOOL_ERR.POP;
  END LOOP;
  . . .

END;


Tool_Err.Tool_Error

  Examples	   Related Topics 	  All Built-ins

Description  Defines a generic error you can raise to indicate that one or more errors have been pushed onto the error stack.

Syntax

Tool_Err.Tool_Error  EXCEPTION;


Tool_Err.Tool_Error example

  Related Topics	   All Examples

/*
** Raise a generic internal error if a function
** argument is out of range.
*/
PROCEDURE my_proc(count PLS_INTEGER) IS
BEGIN
  IF (count < 0) THEN
    RAISE TOOL_ERR.TOOL_ERROR;
  END IF;
  . . .

END;


Tool_Err.Toperror

  Examples	   Related Topics 	  All Built-ins

Description  Identifies the top-most error on the error stack.

Syntax

Tool_Err.Toperror CONSTANT PLS_INTEGER;


Tool_Err.Toperror example

  Related Topics	   All Examples

/*
**  Print top-most error on the stack. The same
**  results are produced by calling Tool_Err.Message
**  with no arguments.
*/
BEGIN
  . . .

  TEXT_IO.PUT_LINE(TOOL_ERR.MESSAGE(TOOL_ERR.TOPERROR));
  . . .

END;


EXEC_SQL package

  Related Topics 	  All Built-ins

The functions and procedures are listed in the order they are usually called in a session.

EXEC_SQL.Open_Connection

EXEC_SQL.Curr_Connection

EXEC_SQL.Default_Connection

EXEC_SQL.Open_Cursor

EXEC_SQL.Parse

EXEC_SQL.Describe_Column

EXEC_SQL.Bind_Variable

EXEC_SQL.Define_Column

EXEC_SQL.Execute

EXEC_SQL.Execute_And_Fetch

EXEC_SQL.Fetch_Rows

EXEC_SQL.More_Result_Sets

EXEC_SQL.Column_Value

EXEC_SQL.Variable_Value

EXEC_SQL.Is_Open

EXEC_SQL.Close_Cursor

EXEC_SQL.Is_Connected

EXEC_SQL.Is_OCA_Connection

EXEC_SQL.Close_Connection

The following functions retrieve information about the last referenced cursor in a connection after a SQL statement execution.

EXEC_SQL.Last_Error_Position

EXEC_SQL.Last_Row_Count

EXEC_SQL.Last_SQL_Function_Code

EXEC_SQL.Last_Error_Code

EXEC_SQL.Last_Error_Mesg


EXEC_SQL.Open_Connection

  Examples	   Related Topics 	   All Built-ins

FUNCTION EXEC_SQL.Open_Connection
    (Username     IN VARCHAR2,
     Password     IN VARCHAR2,
     Data source  IN VARCHAR2)
RETURN EXEC_SQL.ConnType;

Parameters

Connstr	Is a string in the form 'User[/Password][@database_string]'
Username	A string specifying the user name used to connect to the database
Password	A string specifying the password for the user name
Data source	Either a string specifying the SQLNet alias or the OCA connection starting with 'ODBC:'

Returns  A handle to the new database connection.


EXEC_SQL.Open_Connection example

  Related Topics	   All Examples

PROCEDURE getData IS
  --
  -- a connection handle must have a datatype of EXEC_SQL.conntype
  --
  connection_id EXEC_SQL.CONNTYPE;

  ...

BEGIN
  --
  -- a connection string is typically of the form 'username/password@database_alias'
  --
  connection_id := EXEC_SQL.OPEN_CONNECTION('connection_string');

  ...

END;


EXEC_SQL.Curr_Connection

  Examples	   Related Topics 	   All Built-ins

Description  Returns a connection handle that uses the same database connection originally established by Developer. EXEC_SQL.Default_Connection replaces EXEC_SQL.Curr_Connection.

Syntax

FUNCTION EXEC_SQL.Curr_Connection
RETURN EXEC_SQL.ConnType;

Returns  A handle to the primary Developer connection.

Usage notes  Use EXEC_SQL.Default_Connection in place of EXEC_SQL.Curr_Connection. For backward compatibility, EXEC_SQL.Curr_Connection is still supported.


EXEC_SQL.Default_Connection

  Examples	   Related Topics 	   All Built-ins

Description  Returns a connection handle that uses the same database connection originally established by Developer. EXEC_SQL.Default_Connection replaces EXEC_SQL.Curr_Connection.

Syntax

FUNCTION EXEC_SQL.Default_Connection
RETURN EXEC_SQL.ConnType;

Returns  A handle to the primary Developer connection.

Usage notes  The default connection is the primary Developer connection.  The first time EXEC_SQL.Default_Connection is called, the default connection is found, placed in a cache within the EXEC_SQL package, and a handle is returned to the user.  Subsequent calls to EXEC_SQL.Default_Connection simply retrieves the handle from the cache.

Since this connection handle is cached, if you are accessing data from only the default connection, then you do not need to explicitly specify the connection handle in calls to other EXEC_SQL methods; EXEC_SQL automatically looks up the cache to obtain the connection handle.

To clear the cache, call EXEC_SQL.Close_Connection on the connection handle that is obtained from calling EXEC_SQL.Default_Connection.  For default connections, EXEC_SQL.Close_Connection does not terminate the connection, but only frees up the resources used by EXEC_SQL.


EXEC_SQL.Default_Connection and EXEC_SQL.Curr_Connection example

  Related Topics	   All Examples

/*
** This example illustrates the use of
** EXEC_SQL.Default_Connection and
** EXEC_SQL.Curr_Connection.
*/
PROCEDURE esdefaultcon2 IS
  connection_id EXEC_SQL.CONNTYPE;
  bIsConnected BOOLEAN;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  nIgn PLS_INTEGER;
  nRows PLS_INTEGER := 0;
  nTimes PLS_INTEGER := 0;
  mynum NUMBER;

BEGIN
  --
  -- obtain the default connection and check that it is valid
  --
  connection_id := EXEC_SQL.DEFAULT_CONNECTION;
  bIsConnected := EXEC_SQL.IS_CONNECTED;
  IF bIsConnected = FALSE THEN
    TEXT_IO.PUT_LINE('No primary connection. Please connect before retrying.');
    RETURN;
  END IF;
  --
  -- subsequent calls to EXEC_SQL.Open_Cursor, EXEC_SQL.Parse, EXEC_SQL.Define_Column,
  -- EXEC_SQL.Execute, EXEC_SQL.Fetch_Rows, EXEC_SQL.Column_Value,
  -- EXEC_SQL.Close_Cursor, EXEC_SQL.Close_Connection all use this connection
  -- implicitly from the cache
  --
  cursorID := EXEC_SQL.OPEN_CURSOR;
  sqlstr := 'select empno from emp';
  EXEC_SQL.PARSE(cursorID, sqlstr, exec_sql.V7);
  EXEC_SQL.DEFINE_COLUMN(cursorID, 1, mynum);
  nIgn := EXEC_SQL.EXECUTE(cursorID);

  LOOP
    IF (EXEC_SQL.FETCH_ROWS(cursorID) > 0) THEN
      EXEC_SQL.COLUMN_VALUE(cursorID, 1, mynum);

      ...

    ELSE
      exit;
    END IF;
  END LOOP;
  EXEC_SQL.CLOSE_CURSOR(cursorID);
  EXEC_SQL.CLOSE_CONNECTION;
END;


EXEC_SQL.Open_Cursor

  Examples	   Related Topics 	   All Built-ins

Description  Creates a new cursor on a specified connection and returns a cursor handle. When you no longer need the cursor, you must close it explicitly by using EXEC_SQL.Close_Cursor.

Syntax

FUNCTION EXEC_SQL.Open_Cursor
    [Connid     IN CONNTYPE]
RETURN EXEC_SQL.CursType;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  A handle to the new cursor.

Usage Notes  You can use cursors to execute the same SQL statement repeatedly (without reparsing) or to execute a new SQL statement (with parsing). When you reuse a cursor for a new statement, the cursor contents are automatically reset when the new statement is parsed. This means you do not have to close and reopen a cursor before reusing it.


EXEC_SQL.Open_Cursor example

  Related Topics	   All Examples

PROCEDURE getData IS
  --
  -- a cursorID must be of type EXEC_SQL.cursType
  --
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;

  ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION('connect_str');

  ...

  --
  -- this cursor is now associated with a particular connection
  --
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);

  ...

END;


EXEC_SQL.Parse

  Examples	   Related Topics 	   All Built-ins

Description  This procedure parses a statement on a specified cursor.

Syntax

PROCEDURE EXEC_SQL.Parse
    ([Connid     IN CONNTYPE,]
      Curs_Id    IN CURSTYPE,
      Statement  IN VARCHAR2
      [Language  IN PLS_INTEGER]);

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle you want to assign the statement to.
Statement	The SQL statement to be parsed. It should not include a final semicolon.
Language_flag	A flag that determines how Oracle handles the SQL statement. The valid flags are: V6           Specifies Oracle V6 behavior V7           Specifies Oracle V7 behavior NATIVE   Default

Usage Notes  All SQL statements must be parsed using the Parse procedure. Parsing checks the syntax of the statement and associates it with the cursor in your code. Unlike OCI parsing, EXEC_SQL parsing is always immediate. You cannot defer EXEC_SQL parsing.

You can parse any data manipulation language (DML) or data definition language (DDL) statement. For Oracle data sources, the DDL statements are executed on the parse. For non-Oracle data sources, the DDL may be executed on the parse or on the execute. This means you should always parse and execute all DDL statements in EXEC_SQL.


EXEC_SQL.Parse example

  Related Topics	   All Examples

PROCEDURE getData IS
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);

  ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(connect_str);
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  --
  -- the statement to be parsed is stored as a VARCHAR2 variable
  --
  sqlstr := 'select ename from emp';
  --
  -- perform parsing
  --
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);

  ...

END;


EXEC_SQL.Describe_Column

  Examples	   Related Topics 	   All Built-ins

Description  Obtains information about the columns in a result set of a parsed SQL statement. If you try to describe a column number that does not exist in the result set, the EXEC_SQL.Invalid_Column_Number exception is raised. Tip

Syntax

PROCEDURE EXEC_SQL.Describe_Column
    ([Connid     IN CONNTYPE,
      Curs_Id    IN CURSTYPE,
      Position   IN PLS_INTEGER,
      Name       OUT VARCHAR2,
      Collen     OUT PLS_INTEGER,
      Type       OUT PLS_INTEGER]);

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle associated to the column you want to  describe.
Position	Is the position in the result set of the column you want to describe. The positions are numbered from left to right, starting at 1.
Name	Contains the name of the column, on output.
Collen	Contains the maximum length of the column in bytes, on output.
Type	Contains the type of the column, on output. The valid values are one the following: EXEC_SQL.VARCHAR2_TYPE EXEC_SQL.NUMBER_TYPE EXEC_SQL.FLOAT_TYPE EXEC_SQL.LONG_TYPE EXEC_SQL.ROWID_TYPE EXEC_SQL.DATE_TYPE EXEC_SQL.RAW_TYPE EXEC_SQL.LONG_RAW_TYPE EXEC_SQL.CHAR_TYPE (ANSI fixed CHAR) EXEC_SQL.MLSLABLE_TYPE (Trusted Oracle only)


EXEC_SQL.Describe_Column example

  Related Topics	   All Examples

PROCEDURE esdesccol(tablename VARCHAR2) IS
  connection_id EXEC_SQL.CONNTYPE;
  cursor_number EXEC_SQL.CURSTYPE;
  sql_str VARCHAR2(256);
  nIgnore PLS_INTEGER;
  nColumns PLS_INTEGER := 0;	 --count of number of columns returned
  colName VARCHAR2(30);
  colLen PLS_INTEGER;
  colType PLS_INTEGER;

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION('connection_string');
  --
  -- when you do a "select *..." from a table which is known only at runtime,
  -- you cannot know what the columns are a priori. EXEC_SQL.Describe_Column becomes
  -- very usefule then
  --
  sql_str := 'select * from ' || tablename;
  cursor_number := EXEC_SQL.OPEN_CURSOR(connection_id);
  EXEC_SQL.PARSE(connection_id, cursor_number, sql_str, exec_sql.V7);
  nIgnore := EXEC_SQL.EXECUTE(connection_id, cursor_number);

  LOOP
    nColumns := nColumns + 1;  --used as column index into result set
    --
    -- describe_column is in general used within a PL/SQL block with an exception
    -- block included to catch the EXEC_SQL.invalid_column_number exception.
    -- when no more columns are found, we can store the returned column names
    -- and column lengths in a PL/SQL table of records and do further queries
    -- to obtain rows from the table. In this example, colName, colLen and colType
    -- are used to store the returned column characteristics.
    --
  BEGIN
    EXEC_SQL.DESCRIBE_COLUMN(connection_id, cursor_number,
                      nColumns, colName, colLen, colType);
         TEXT_IO.PUT_LINE(' col= ' || nColumns || ' name ' || colName  ||
                          ' len= ' || colLen   || ' type ' || colType );
  EXCEPTION
    WHEN EXEC_SQL.INVALID_COLUMN_NUMBER THEN
      EXIT;
    END;
  END LOOP;

  nColumns := nColumns - 1;
  IF (nColumns <= 0) THEN
    TEXT_IO.PUT_LINE('No columns returned in query');
  END IF;

  ...

  EXEC_SQL.CLOSE_CURSOR(connection_id, cursor_number);
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
END;


EXEC_SQL.Bind_Variable

  Examples	   Related Topics 	   All Built-ins

Description  Binds a given value to a named variable in a SQL statement.

Syntax

PROCEDURE EXEC_SQL.Bind_Variable
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE,
      Name       IN VARCHAR2,
      Value      IN <datatype>);

where <datatype> can be one of the following:

      NUMBER
      DATE
      VARCHAR2

PROCEDURE EXEC_SQL.Bind_Variable
    ([Connid          IN CONNTYPE],
      Curs_Id         IN CURSTYPE,
      Name            IN VARCHAR2,
      Value           IN VARCHAR2,
      Out_Value_Size  IN PLS_INTEGER);

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle in which to bind the variable.
Name	Is the name of the variable in the SQL statement.
Value	For IN and IN/OUT variables, the value is the data you want to bind to the named variable. For OUT variables, the data is actually ignored but you must still use Bind_Variable to indicate the type of PL/SQL variable to be retrieved later by Variable_Value.
Out_Value_Size	The maximum OUT value size in bytes expected for the VARCHAR2 OUT or IN/OUT variables. If no size is specified, the current length of the Value parameter is used.

Usage Notes  Use placeholders in SQL statements to mark where input data is to be supplied during runtime. You must also use placeholders for output values if the statement is a PL/SQL block or a call to a stored procedure with output parameters.

For each input placeholder, you must use EXEC_SQL.Bind_Variable to supply the value. For each output placeholder, you must also use EXEC_SQL.Bind_Variable to specify the type of variable to use for retrieving the value in subsequent EXEC_SQL.Variable_Value calls.

The input placeholder or bind variable in a SQL statement is identified by a name beginning with a colon. For example, the string ':X' is the bind variable in the following SQL statement:

SELECT ename FROM emp WHERE SAL > :X;

The corresponding EXEC_SQL.Bind_Variable procedure is:

BIND_VARIABLE(connection_handle, cursor_handle, ':X', 3500);


EXEC_SQL.Bind_Variable example

  Related Topics	   All Examples

PROCEDURE getData(input_empno NUMBER) IS
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);

  ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(connect_str);
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  --
  -- the statement to be parsed contains a bind variable
  --
  sqlstr := 'select ename from emp where empno = :bn';
  --
  -- perform parsing
  --
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  --
  -- the bind_variable procedure assigns the value of the input argument to the named
  -- bind variable. Note the use of the semi-colon and the quotes to designate the
  -- bind variable. The bind_variable procedure is called after the parse procedure.
  --
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn', input_empno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, mynum);

  ...

END;


EXEC_SQL.Define_Column

  Examples	   Related Topics 	   All Built-ins

Description  This procedure is used only with SELECT statements or calls to non-Oracle stored procedures that return a result set. It defines a column to be fetched from a specified cursor. The column is identified by its relative position in the result set; the first relative position is identified by the integer 1. The PL/SQL type of the Column parameter determines the type of the column being defined.

Syntax

PROCEDURE EXEC_SQL.Define_Column
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE,
      Position   IN PLS_INTEGER,
      Column     IN <datatype>);

where <datatype> can be one of the following:

      NUMBER
      DATE
      VARCHAR2

PROCEDURE EXEC_SQL.Define_Column
    ([Connid       IN CONNTYPE],
      Curs_Id      IN CURSTYPE,
      Position     IN PLS_INTEGER,
      Column       IN VARCHAR2,
      Column_Size  IN PLS_INTEGER);

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle you want to define the column for.
Position	Is the relative position of the column in the row or result set. The first column in the statement has a relative position of 1.
Column	Is the value of the column being defined. The value type determines the column type being defined. The actual value stored in the variable is ignored.
Column_Size	Is the maximum expected size of the column value in bytes (for column type VARCHAR2 only)

Usage Notes  For a query, you must define the column before retrieving its data by EXEC_SQL.Column_Value.


EXEC_SQL.Define_Column example

  Related Topics	   All Examples

PROCEDURE getData IS
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  loc_ename VARCHAR2(30);   -- these are variables local to the procedure;
  loc_eno NUMBER;           -- used to store the return values from our desired
  loc_hiredate DATE;        -- query

 ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(connect_str);
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  sqlstr := 'select ename, empno, hiredate from emp ';
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn', input_empno);
  --
  -- we make one call to DEFINE_COLUMN per item in the select list. We must use local
  -- variables to store the returned values. For a result value that is a VARCHAR, it
  -- is important to specify the maximumn length. For a result value that is a number
  -- or a date, there is no need to specify the maximum length. We obtain the
  -- relative positions of the columns being returned from the select statement,
  -- sql_str.
  --
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, loc_ename, 30);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 2, loc_eno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 3, loc_hiredate);

 ...

END;


EXEC_SQL.Execute

  Examples	   Related Topics 	   All Built-ins

Description  Executes the SQL statement at a specified cursor.

Syntax

FUNCTION EXEC_SQL.Execute
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE)
RETURN PLS_INTEGER;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle to the SQL statement you want to execute.
Returns  The number of rows processed.

Usage Notes  The return value is only valid for INSERT, UPDATE and DELETE statements. For other statements, including DDL, ignore the return value because it is undefined.


EXEC_SQL.Execute example

  Related Topics	   All Examples

PROCEDURE getData IS
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  loc_ename VARCHAR2(30);
  loc_eno NUMBER;
  loc_hiredate DATE;
  nIgn PLS_INTEGER;

 ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(connect_str);
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  sqlstr := 'select ename, empno, hiredate from emp ';
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn', input_empno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, loc_ename, 30);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 2, loc_eno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 3, loc_hiredate);
  --
  -- after parsing, and calling BIND_VARIABLE and DEFINE_COLUMN, if necessary, you
  -- are ready to execute the statement. Note that all information about the
  -- statement and its result set is encapsulated in the cursor referenced as cursorID.
  --
  nIgn := EXEC_SQL.EXECUTE(connection_id, cursorID);

 ...

END;


EXEC_SQL.Execute_And_Fetch

  Examples	   Related Topics 	   All Built-ins

Description  This function calls EXEC_SQL.Execute and then EXEC_SQL.Fetch_Rows. It executes a SQL statement at a specified cursor and retrieves the first row that satisfies the query. Calling EXEC_SQL.Execute_And_Fetch may reduce the number of round-trips when used against a remote database.

Syntax

FUNCTION EXEC_SQL.Execute_And_Fetch
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE,
      Exact      IN BOOLEAN DEFAULT FALSE)
RETURN PLS_INTEGER;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle to the SQL statement you want to execute.
Exact	The default is FALSE. Set to TRUE to raise the exception EXEC_SQL.Package_Error. The row is retrieved even if the exception is raised.
Returns  The number of rows fetched (either 0 or 1).


EXEC_SQL.Execute_And_Fetch example

  Related Topics	   All Examples

PROCEDURE getData(input_empno NUMBER) IS
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  loc_ename VARCHAR2(30);
  loc_eno NUMBER;
  loc_hiredate DATE;
  nIgn PLS_INTEGER;

 ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(connect_str);
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  --
  -- assuming that empno is a primary key of the table emp, the where clause guarantees
  -- that 0 or 1 row is returned
  --
  sqlstr := 'select ename, empno, hiredate from emp '
  sqlstr := sqlstr || ' where empno = ' || input_empno;
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn', input_empno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, loc_ename, 30);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 2, loc_eno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 3, loc_hiredate);
  --
  -- do execute_and_fetch after parsing the statement, and calling bind_variable and
  -- define_column if necessary
  --
  nIgn := EXEC_SQL.EXECUTE_AND_FETCH (connection_id, cursorID);
  IF (nIgn = 0 ) THEN
    TEXT_IO.PUT_LINE (' No employee has empno = ' || input_empno);
  ELSE IF (nIgn = 1) THEN
    TEXT_IO.PUT_LINE (' Found one employee with empno ' || input_empno);
  --
  -- obtain the values in this row
  --
    EXEC_SQL.column_value(connection_id, cursorID, 1, loc_ename);
    EXEC_SQL.column_value(connection_id, cursorID, 2, loc_eno);
    EXEC_SQL.column_value(connection_id, cursorID, 3, loc_hiredate);

 ...

  END IF;

 ...

END;


EXEC_SQL.Fetch_Rows

  Examples	   Related Topics 	   All Built-ins

Description  Retrieves a row that satisfies the query at a specified cursor.

Syntax

FUNCTION EXEC_SQL.Fetch_Rows
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE)
RETURN PLS_INTEGER;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle to the SQL statement from which you want to fetch.
Returns  The number of rows actually fetched.

Usage Notes  Each EXEC_SQL.Fetch_Rows call retrieves one row into a buffer. Use EXEC_SQL.Fetch_Rows repeatedly until 0 is returned. For Oracle databases, this means there is no more data in the result set. For non-Oracle data sources, this does not mean there is no more data in the specified cursor. See EXEC_SQL.More_Results_Sets for more information.

After each EXEC_SQL.Fetch_Rows call, use EXEC_SQL.Column_Value to read each column in the fetched row.


EXEC_SQL.Fetch_Rows example

  Related Topics	   All Examples

PROCEDURE getData IS
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  loc_ename VARCHAR2(30);
  loc_eno NUMBER;
  loc_hiredate DATE;
  nIgn PLS_INTEGER;
  nRows PLS_INTEGER := 0;  -- used for counting the actual number of rows returned

 ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(connect_str);
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  sqlstr := 'select ename, empno, hiredate from emp ';
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn', input_empno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, loc_ename, 30);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 2, loc_eno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 3, loc_hiredate);
  nIgn := EXEC_SQL.EXECUTE(connection_id, cursorID);
  --
  -- call FETCH_ROWS to obtain a row. When a row is returned, obtain the values,
  -- and increment the count.
  --
  WHILE (EXEC_SQL.FETCH_ROWS(connection_id, cursorID) > 0 ) LOOP
    nRows := nRows + 1;
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, loc_ename;
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 2, loc_eno);
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 3, loc_hiredate);

 ...

  END LOOP;
  --
  -- The loop terminates when FETCH_ROWS returns 0. This could have happen because
  -- the query was incorrect or because there were no more rows.  To distinguish
  -- between these cases, we keep track of the number of rows returned.
  --
  IF (nRows <= 0) THEN
    TEXT_IO.PUT_LINE ('Warning: query returned no rows');
  END IF;

 ...

END;


EXEC_SQL.More_Result_Sets

  Examples	   Related Topics 	   All Built-ins

Description  This function applies to non-Oracle connections only. It determines if there is another result set to retrieve for a specified cursor.

Syntax

FUNCTION EXEC_SQL.More_Result_Sets
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE)
RETURN BOOLEAN;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle to the SQL statement from which you want to fetch.
Returns  TRUE or FALSE

Usage Notes  If used against Oracle databases, the function always returns FALSE. If a non-Oracle stored procedure has another result set to retrieve, the function initializes the result set and returns TRUE. Use EXEC_SQL.Describe_Column to obtain information about the new result set and EXEC_SQL.Fetch_Rows to retrieve the data, if required.


EXEC_SQL.More_Result_Sets example

  Related Topics	   All Examples

PROCEDURE esmoreresultsets(sqlstr VARCHAR2) IS
  conidODBC EXEC_SQL.CONNTYPE;
  nRes PLS_INTEGER;
  nRows PLS_INTEGER := 0 ;
  curID EXEC_SQL.CURSTYPE;
BEGIN
  --
  -- an ODBC connection string; usually has the form 'username/password@ODBD:dbname'
  --
  conidODBC := EXEC_SQL.OPEN_CONNECTION('connection_str_ODBC');
  curID := EXEC_SQL.OPEN_CURSOR(conidODBC);
  EXEC_SQL.PARSE(conidODBC, curID, sqlstr, exec_sql.v7);
  nRes := EXEC_SQL.EXECUTE(conidODBC, curID);
  --
  -- obtain results from first query in sqlstr
  WHILE (EXEC_SQL.FETCH_ROWS(conidODBC, curID) > 0) LOOP
    nRows := nRows + 1;

 ...

  END LOOP;
  --
  -- for some non-Oracle databases, sqlstr may contain a batch of queries;
  -- MORE_RESULT_SETS checks for additional result sets
  --
  IF (EXEC_SQL.MORE_RESULT_SETS(conidODBC, curID)) THEN
    TEXT_IO.PUT_LINE(' more result sets ');
  ELSE
    TEXT_IO.PUT_LINE(' no more result sets ');
  END IF;

 ...

  EXEC_SQL.CLOSE_CONNECTION(conidODBC);
END;


EXEC_SQL.Column_Value

  Examples	   Related Topics 	   All Built-ins

Description  This procedure returns the value of the cursor for a given position in a given cursor. It is used to access the data fetched by calling EXEC_SQL.Fetch_Rows.

Syntax

PROCEDURE EXEC_SQL.Column_Value
    ([Connid        IN CONNTYPE],
      Curs_Id       IN CURSTYPE,
      Position      IN PLS_INTEGER,
      Value         OUT <datatype>,
     [Column_Error  OUT NUMBER],
     [Actual_Length OUT PLS_INTEGER]);

where <datatype> is one of the following:

NUMBER
DATE
VARCHAR2

Parameters

Name	Mode	Description
Connid	IN	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	IN	Is the cursor handle to the row from which you want to get the column value.
Position	IN	Is the relative position of the column in the specified cursor. Starting from the left, the first column is position 1.
Value	OUT	Returns the value of the specified column and row.
Column_Error	OUT	Returns the error code for the specified column value (Oracle data sources only).
Actual_Length	OUT	Returns the actual length of the column value before truncation.

Usage Notes  You must use EXEC_SQL.Define_Column to define the column data characteristics before using EXEC_SQL.Column_Value to retrieve the value.  If you specify a value which has a PL/SQL type that is different from what was specified by  EXEC_SQL.Define_Column, the exception EXEC_SQL.Value_Error is raised.


EXEC_SQL.Column_Value example

  Related Topics	   All Examples

PROCEDURE getData IS
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  loc_ename VARCHAR2(30);
  loc_eno NUMBER;
  loc_hiredate DATE;
  nIgn PLS_INTEGER;
  nRows PLS_INTEGER := 0;

 ...

BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(connect_str);
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  sqlstr := 'select ename, empno, hiredate from emp ';
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn', input_empno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, loc_ename, 30);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 2, loc_eno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 3, loc_hiredate);
  nIgn := EXEC_SQL.EXECUTE(connection_id, cursorID);
  --
  -- You must have used DEFINE_COLUMN to define the column data characteristics before
  -- using COLUMN_VALUE to retrieve the value. Assign the row's first value to the


  -- local variable loc_ename. Assign the row's second value to the local variable
  -- loc_eno. Assign the row's third value to the local variable loc_hiredate.
  --
  WHILE (EXEC_SQL.FETCH_ROWS(connection_id, cursorID) > 0 ) LOOP
    nRows := nRows + 1;
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, loc_ename);
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 2, loc_eno);
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 3, loc_hiredate);

   ...

  END LOOP;
  IF (nRows <= 0) THEN
    TEXT_IO.PUT_LINE ('Warning: query returned no rows');
  END IF;

 ...

END;


EXEC_SQL.Variable_Value

  Examples	   Related Topics 	   All Built-ins

Description  This procedure retrieves the output value of a named bind variable at a specified cursor. It also returns the values of bind variables in anonymous PL/SQL blocks.

Syntax

PROCEDURE EXEC_SQL.Variable_Value
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE,
      Name       IN VARCHAR2,
      Value      OUT <datatype>);

where <datatype> is one of the following:

NUMBER
DATE
VARCHAR2

Parameters

Name	Mode	Description
Connid	IN	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	IN	Is the cursor handle you want to retrieve the bind variable from.
Name	IN	Is the name of the bind variable.
Value	OUT	Returns the value of the bind variable for the specified cursor.

Usage Notes  If you try to retrieve a data type other than what was specified for the bind variable by EXEC_SQL.Bind_Variable, the exception EXEC_SQL.Value_Error is raised.


EXEC_SQL.Variable_Value example

  Related Topics	   All Examples

It is assumed that the following procedure, tstbindnum, exists on the server which is specified by the connection string used in OPEN_CONNECTION.

Create or replace procedure tstbindnum (input IN NUMBER, output OUT NUMBER) as

BEGIN
  output := input * 2;
END;

All this procedure does is to take an input number, double its value, and return it in the out variable.

PROCEDURE esvarvalnum (input IN NUMBER) IS
  connection_id EXEC_SQL.CONNTYPE;
  bIsConnected BOOLEAN;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  nRes PLS_INTEGER;
  mynum NUMBER;
BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION('connection_string');
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  sqlstr := 'begin   tstbindnum(:bn1, :bnret);   end;';   -- an anonymous block
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  --
  -- define input value
  --
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn1', input);
  --
  -- set up output value
  --
  EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bnret', mynum);
  nRes := EXEC_SQL.EXECUTE(connection_id, cursorID);
  --
  -- after the statement is executed, we call VARIABLE_VALUE to obtain the value of
  -- the bind variable :bnret
  --
  EXEC_SQL.VARIABLE_VALUE(connection_id, cursorID, ':bnret', mynum);
  EXEC_SQL.CLOSE_CURSOR(connection_id, cursorID);
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
END;


EXEC_SQL.Is_Open

  Examples	   Related Topics 	   All Built-ins

Description  Returns TRUE if a specified cursor is currently open on a specified connection.

Syntax

FUNCTION EXEC_SQL.Is_Open
    ([Connid     IN CONNTYPE],
      Curs_Id    IN CURSTYPE)
RETURN BOOLEAN;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	Is the cursor handle you want to determine if it is open.
Returns  TRUE or FALSE


EXEC_SQL.Is_Open, EXEC_SQL.Close_Cursor, EXEC_SQL.Is_Connected and EXEC_SQL.Close_Connection example

  Related Topics	   All Examples

/*
** This example illustrates the use of EXEC_SQL.Is_Open,
** EXEC_SQL.Close_Cursor, EXEC_SQL.Is_Connected and
** EXEC_SQL.Close_Connection.
*/
PROCEDURE esclosecursor.pld IS
  connection_id EXEC_SQL.CONNTYPE;
  bIsConnected BOOLEAN;
  cr1 EXEC_SQL.CURSTYPE;
  sqlstr1 VARCHAR2(200);
  sqlstr2 VARCHAR2(200);
  nRes PLS_INTEGER;
  bOpen BOOLEAN;
  nRows PLS_INTEGER;
  loc_ename VARCHAR2(30);
  loc_eno NUMBER;
  loc_hiredate DATE;
BEGIN
  BEGIN
    connection_id := EXEC_SQL.OPEN_CONNECTION('connection_str');
  EXCEPTION
    WHEN EXEC_SQL.PACKAGE_ERROR THEN
    TEXT_IO.PUT_LINE(' connection open failed ');
  END;
  --
  -- confirm that connection is valid
  --
  bIsConnected := EXEC_SQL.IS_CONNECTED(connection_id);
  IF bIsConnected = FALSE THEN
    TEXT_IO.PUT_LINE('No present connection to any data source.  Please connect before retrying.');
    RETURN;
  END IF;
  --
  -- open a cursor and do an update
  --
  cr1 := EXEC_SQL.OPEN_CURSOR(connection_id);
  sqlstr1 := 'update emp set empno = 3600 where empno = 7839';
  EXEC_SQL.PARSE(connection_id, cr1, sqlstr1, exec_sql.V7);

  nRes := EXEC_SQL.EXECUTE(connection_id, cr1);
  --
  -- reuse the same cursor, if open, to do another query.
  --
  sqlstr2 := 'select ename, empno, hiredate from emp ';
  --
  -- use IS_OPEN to check the state of the cursor
  --
  IS (EXEC_SQL.IS_OPEN(connection_id, cr1) != TRUE) THEN
    TEXT_IO.PUT_LINE('Cursor no longer available ');
    RETURN;
  END IF;
  --
  -- associate the cursor with another statement, and proceed to do the query.
  --
  EXEC_SQL.PARSE(connection_id, cr1, sqlstr2, exec_sql.V7);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cr1, 1, loc_ename, 30);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cr1, 2, loc_eno);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cr1, 3, loc_hiredate);
  nIgn := EXEC_SQL.EXECUTE(connection_id, cr1);
  WHILE (EXEC_SQL.FETCH_ROWS(connection_id, cursorID) > 0 ) LOOP
    nRows := nRows + 1;
    EXEC_SQL.COLUMN_VALUE(connection_id, cr1, 1, loc_ename);
    EXEC_SQL.COLUMN_VALUE(connection_id, cr1, 2, loc_eno);
    EXEC_SQL.COLUMN_VALUE(connection_id, cr1, 3, loc_hiredate);

 ...

  END LOOP;
  --
  -- close the cursor and connection to free up resources
  --
  EXEC_SQL.CLOSE_CURSOR(connection_id, cr1);
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
END;


EXEC_SQL.Close_Cursor

  Examples	   Related Topics 	   All Built-ins

Description  Closes a specified cursor and releases the memory allocated to it.

Syntax

PROCEDURE EXEC_SQL.Close_Cursor
    ([Connid     IN CONNTYPE],
      Curs_Id    IN OUT CURSTYPE);

Parameters

Parameter	Mode	Description
Connid	IN	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
Curs_Id	IN OUT	Is the cursor handle you want to close. Sets to NULL.
Usage Notes  When you no longer need a cursor, you must close it. Otherwise, you may not be able to open new cursors.


EXEC_SQL.Is_Connected

  Examples	   Related Topics 	   All Built-ins

Description  Returns TRUE if a specified connection handle is currently connected to a data source.

Syntax

FUNCTION EXEC_SQL.Is_Connected
    [Connid     IN CONNTYPE]
RETURN BOOLEAN;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  TRUE or FALSE


EXEC_SQL.Is_OCA_Connection

  Examples	   Related Topics 	   All Built-ins

Description  Returns TRUE if a specified connection handle is for an OCA connection.

Syntax

FUNCTION EXEC_SQL.Is_OCA_Connection
    ([Connid     IN CONNTYPE]
RETURN BOOLEAN;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  TRUE or FALSE


EXEC_SQL.Is_OCA_Connection example

  Related Topics	   All Examples

PROCEDURE esmoreresultsets(sqlstr VARCHAR2) IS
  conidODBC EXEC_SQL.CONNTYPE;
  nRes PLS_INTEGER;
  nRows PLS_INTEGER := 0 ;
  curID EXEC_SQL.CURSTYPE;
BEGIN
  --
  -- an ODBC connection string
  --
  conidODBC := EXEC_SQL.OPEN_CONNECTION('connection_str_ODBC');
  curID := EXEC_SQL.OPEN_CURSOR(conidODBC);
  EXEC_SQL.PARSE(conidODBC, curID, sqlstr, exec_sql.v7);
  nRes := EXEC_SQL.EXECUTE(conidODBC, curID);
  --
  -- obtain results from first query in sqlstr
  --
  WHILE (EXEC_SQL.FETCH_ROWS(conidODBC, curID) > 0) LOOP
    nRows := nRows + 1;

 ...

  END LOOP;
  --
  -- check whether this is an OCA connection. Does not continue for an Oracle
  -- connection.
  --
  IF (EXEC_SQL.IS_OCA_CONNECTION != TRUE) THEN
    TEXT_IO.PUT_LINE('Not an OCA connection ');
    RETURN;
  END IF;
  --
  -- check for more result sets
  --
  IF (EXEC_SQL.MORE_RESULT_SETS(conidODBC, curID)) THEN
    TEXT_IO.PUT_LINE(' more result sets ');
  ELSE
    TEXT_IO.PUT_LINE(' no more result sets ');
  END IF;

 ...

  EXEC_SQL.CLOSE_CONNECTION(conidODBC);
END;


EXEC_SQL.Close_Connection

  Examples	   Related Topics 	   All Built-ins

Description  This procedure releases any resources used by the connection handle and invalidates it.

Syntax

PROCEDURE EXEC_SQL.Close_Connection
    ([Connid     IN OUT CONNTYPE]);

Parameters

Name	Mode	Description
Connid	IN	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.
	OUT	Sets the handle to NULL. All memory allocated to the handle is also released.

Usage Notes  If the connection is opened by EXEC_SQL.Open_Connection, EXEC_SQL.Close_Connection also closes the database connection. If it is opened by EXEC_SQL.Default_Connection, EXEC_SQL.Close_Connection does not close the database connection.

It is important to close the connection when you do not need it. If you do not close the connection, the database connection remains open and any memory allocated to the connection, including opened cursors, remain in use. This may result in connection deadlocks.


EXEC_SQL.Last_Error_Position

  Examples	   Related Topics 	   All Built-ins

Description  Returns the byte offset in the SQL statement where an error occurred. The first character in the statement is at position 0.

Syntax

FUNCTION EXEC_SQL.Last_Error_Position
    [Connid     IN CONNTYPE]
RETURN PLS_INTEGER;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  An integer.

Usage Notes  Use this function after EXEC_SQL.PARSE, and before another EXEC_SQL procedure or function. The byte offset at which an error occurred cannot be determined for OCA data sources.


EXEC_SQL.Last_Error_Position example

  Related Topics	   All Examples

PROCEDURE eslasterrorpos(sqlstr VARCHAR2) is
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  nErrPos PLS_INTEGER := 0;
  errmesg VARCHAR2(256);
BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION('');
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  BEGIN
  --
  -- parsing statement from caller
  --
    EXEC_SQL.parse(connection_id, cursorID, sqlstr, exec_sql.V7);
  --
  -- check for error in statement; find out position where statement syntax is in error
  --
  EXCEPTION
    WHEN EXEC_SQL.PACKAGE_ERROR THEN
      nErrPos := EXEC_SQL.LAST_ERROR_POSITION(connection_id);
      TEXT_IO.PUT_LINE(' position in text where error occured '|| nErrPos);
      errmesg := EXEC_SQL.LAST_ERROR_MESG(connection_id);
      TEXT_IO.PUT_LINE(' error message ' || errmesg);
      RETURN;
  END;
  --
  -- here to execute statement
  --

  ...

  nRes := EXEC_SQL.EXECUTE(connection_id, cursorID);

  ...

  EXEC_SQL.CLOSE_CURSOR(connection_id, cursorID);
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
END;


EXEC_SQL.Last_Row_Count

  Examples	   Related Topics 	   All Built-ins

Description  Returns the cumulative number of rows fetched.

Syntax

FUNCTION EXEC_SQL.Last_Row_Count
    [Connid     IN CONNTYPE]
RETURN PLS_INTEGER;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  An integer.

Usage Notes  Use this function after calling EXEC_SQL.Fetch_Rows or EXEC_SQL.Execute_And_Fetch. The function returns a zero when used after an EXEC_SQL.Execute call.


EXEC_SQL.Last_Row_Count example

  Related Topics	   All Examples

PROCEDURE eslastrowcount is
  connection_id EXEC_SQL.CONNTYPE;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  nIgn PLS_INTEGER;
  nRows PLS_INTEGER := 0 ;
  mynum NUMBER;
BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION('connection_str');
  cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
  --
  -- in this query, we order the results explicitly
  --
  sqlstr := 'select empno from emp order by empno';
  EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
  EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, mynum);
  nIgn := EXEC_SQL.EXECUTE(connection_id, cursorID);
  LOOP
    nIgn := EXEC_SQL.FETCH_ROWS(connection_id, cursorID);
    --
    -- do whatever processing is desired
    --
    IF (nIgn > 0) THEN
      EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, mynum);

      ...

    END IF;
    nRows := EXEC_SQL.LAST_ROW_COUNT(connection_id);
    --
    -- In this example, we are only interested in the first 10 rows, and exit after
    -- fetching them
    --
    IF (nRows > 10) THEN
      EXIT;
    END IF;
  END LOOP;
  EXEC_SQL.CLOSE_CURSOR(connection_id, cursorID);
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
END;


EXEC_SQL.Last_SQL_Function_Code

  Examples	   Related Topics 	   All Built-ins

Description  Returns the last SQL function code, indicating the type of SQL statement. For a list of valid function codes, see your Programmer's Guide to the Oracle Call Interface.

Syntax

FUNCTION EXEC_SQL.Last_SQL_Function_Code
    [Connid     IN CONNTYPE]
RETURN PLS_INTEGER;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  An integer.

Usage Notes  Use this function immediately after parsing the SQL statement.


EXEC_SQL.Last_SQL_Function_Code example

  Related Topics	   All Examples

/*
** In this procedure, a statement is passed in and executed.  If the statement is a
** select statement, then further processing is initiated to determine the column
** characteristics.
*/

PROCEDURE eslastfunccode(sqlstr VARCHAR2) IS
  connection_id EXEC_SQL.CONNTYPE;
  cursor_number EXEC_SQL.CursType;
  --
  -- The values for the function codes is dependent on the RDBMS version.
  --
  SELECTFUNCCODE PLS_INTEGER := 3;
  sql_str VARCHAR2(256);
  nColumns PLS_INTEGER := 0;
  nFunc PLS_INTEGER := 0;
  colName VARCHAR2(30);
  colLen PLS_INTEGER;
  colType PLS_INTEGER;
BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION('connection_str');
  cursor_number := EXEC_SQL.OPEN_CURSOR(connection_id);
  EXEC_SQL.PARSE(connection_id, cursor_number, sql_str, exec_sql.V7);
  nIgnore := EXEC_SQL.EXECUTE(connection_id, cursor_number);
  --
  -- check what kind of function it is
  --
  nFunc := EXEC_SQL.LAST_SQL_FUNCTION_CODE(connection_id);
  IF (nFunc != SELECTFUNCCODE) THEN
    RETURN;
  END IF;
  --
  -- proceed to obtain the column characteristics
  --
  LOOP
    nColumns := nColumns + 1;
    BEGIN
      EXEC_SQL.DESCRIBE_COLUMN(connection_id, cursor_number,
                        nColumns, colName, colLen, colType);
           TEXT_IO.PUT_LINE(' col= ' || nColumns || ' name ' || colName  ||
                            ' len= ' || colLen   || ' type ' || colType );
    EXCEPTION
    WHEN EXEC_SQL.INVALID_COLUMN_NUMBER THEN
      EXIT;
    END;
  END LOOP;
  EXEC_SQL.CLOSE_CURSOR(connection_id, cursor_number);
  EXEC_SQL.LCOSE_CONNECTION(connection_id);
END;


EXEC_SQL.Last_Error_Code

  Examples	   Related Topics 	   All Built-ins

Description  Returns the last Oracle error code raised on a connection.

Syntax

FUNCTION EXEC_SQL.Last_Error_Code
    [Connid     IN CONNTYPE]
RETURN PLS_INTEGER;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  An integer.

Usage Notes  Use this function immediately after the EXEC_SQL.Package_Error exception is raised.


EXEC_SQL.Last_Error_Code and EXEC_SQL.Last_Error_Mesg example

  Related Topics	   All Examples

/*
** In the following procedure, we execute a statement that is passed in. If there
** are any exceptions shown, we check to see its nature using LAST_ERROR_CODE
** and LAST_ERROR_MESG.
*/

procedure eslastfunccode(sqlstr varchar2) is
  connection_id exec_sql.connType;
  cursor_number exec_sql.CursType;
  sql_str VARCHAR2(256);
  nIgnore pls_integer;
BEGIN
  connection_id := exec_sql.open_connection('connection_str');
  cursor_number := exec_sql.open_cursor(connection_id);
  exec_sql.parse(connection_id, cursor_number, sql_str, exec_sql.V7);
  nIgnore := exec_sql.execute(connection_id, cursor_number);
  exec_sql.close_cursor(connection_id, cursor_number);
  exec_sql.close_connection(connection_id);
--
-- check the error in the exception block
--
EXCEPTION
  WHEN exec_sql.package_error THEN
    text_io.put_line('error :'  ||
       to_char(exec_sql.last_error_code(connection_id))  || '  ' ||
       exec_sql.last_error_mesg(connection_id) );
  --
  -- ensure that even though an error has occurred, the cursor and connection
  -- are closed.
  --
  IF exec_sql.is_connected(connection_id) THEN
    IF exec_sql.is_open(connection_id, cursor_number) THEN
      exec_sql.close_cursor(connection_id, cursor_number);
    END IF;
    exec_sql.close_connection(connection_id);
  END IF;
END;


EXEC_SQL.Last_Error_Mesg

  Examples	   Related Topics 	   All Built-ins

Description  Returns the text message of the last error code raised on a connection.

Syntax

FUNCTION EXEC_SQL.Last_Error_Mesg
    [Connid     IN CONNTYPE]
RETURN VARCHAR2;

Parameters

Connid	Is the handle to the connection you want to use. If you do not specify a connection, EXEC_SQL.Default_Connection retrieves the primary Developer connection handle from the cache.

Returns  A string.

Usage Notes  Use this function immediately after the EXEC_SQL.Package_Error exception is raised.


Tip

To obtain the number of columns in a result set, loop through the columns from 1 until the EXEC_SQL.Invalid_Column_Number exception is raised.


Changing the primary database connection

  Related Topics

If you change the primary Developer connection after you have called EXEC_SQL.Default_Connection, the next EXEC_SQL.Default_Connection call continues to return the handle from the cache; it does not automatically return a handle to the new primary connection.

To make sure you have the correct handle, always use EXEC_SQL.Close_Connection (without arguments) before you change the primary connection. This allows EXEC_SQL to free up the memory resources allocated to the previous connection, without actually closing it.


LIST package

  Related Topics 	  All Built-ins

List.Appenditem

List.Destroy

List.Deleteitem

List.Fail

List.Getitem

List.Insertitem

List.Listofchar

List.Make

List.Nitems

List.Prependitem


List.Appenditem

  Examples	   Related Topics 	   All Built-ins

Description  Appends an item to the List.

Syntax

PROCEDURE List.Appenditem
   (List Listofchar,
    item VARCHAR2);

Parameters

List	A List.
item	A List Item.


List.Appenditem example

  Related Topics	   All Examples

 /*
** Add an item to the end of 'my_List' then
** print out the number of items in the List
*/
PROCEDURE append (my_List List.Listofchars) IS
BEGIN
  List.Appenditem(my_List, 'This is the last item.');
  Text_IO.Put_Line(List.Getitem(my_List,
    List.Nitems(my_List)));
END;


List.Destroy

  Examples	   Related Topics 	   All Built-ins

Description  Destroys an entire List.

Syntax

PROCEDURE List.Destroy
   (List Listofchar);

Parameters

List	A List.


List.Destroy example

  Related Topics	   All Examples

 /*
**  Destroy the List
*/
List.Destroy(my_package.my_List);


List.Deleteitem

  Examples	   Related Topics 	   All Built-ins

Description  Deletes the item at the specified position in the List.

Syntax

PROCEDURE List.Deleteitem
   (List Listofchar),
    pos  PLS_INTEGER);

Parameters

List	A List.
pos	A position (base equals 0).


List.Deleteitem example

  Related Topics	   All Examples

 /*
** Delete the third item from 'my_List'
*/
List.Deleteitem(my_package.my_List, 2));


List.Fail

  Examples	   Related Topics 	   All Built-ins

Description  Raised when any List Operation fails.

Syntax

List.Fail   EXCEPTION;


List.Fail example

  Related Topics	   All Examples

 /*
** Provide an exception handler for the
** List.Fail exception
*/
EXCEPTION
  WHEN List.Fail THEN
    Text_IO.Put_Line('list Operation Failed');


List.Getitem

  Examples	   Related Topics 	   All Built-ins

Description  Gets an item from the List.

Syntax

FUNCTION List.Getitem
   (List Listofchar,
    pos  PLS_INTEGER)
RETURN VARCHAR2;

Parameters

List	A List.
pos	A position (base equals 0).
Returns  An item from the specified List.


List.Getitem example

  Related Topics	   All Examples

 /*
** Retrieve and print out the second item
** in my_List
*/
Text_IO.Put_Line(List.Getitem(my_List, 1));


List.Insertitem

  Examples	   Related Topics 	   All Built-ins

Description  Inserts an item into the List At the specified position.

Syntax

PROCEDURE List.Insertitem
   (List Listofchar),
    pos  PLS_INTEGER,
    item VARCHAR2);

Parameters

List	A List.
pos	A position (base equals 0).
item	A List Item.


List.Insertitem example

  Related Topics	   All Examples

 /*
** Add a string to the List In third place
** then retrieve the third item and print it
*/
PROCEDURE insert_item(my_List List.Listofchar) IS
BEGIN
  List.Insertitem(my_List, 2, 'This is the third
    item.');
  Text_IO.Put_Line(List.Getitem(my_List, 2));
END;


List.Listofchar

  Examples	   Related Topics 	   All Built-ins

Description  Specifies a handle to a List.

Syntax

TYPE List.Listofchar;


List.Listofchar example

  Related Topics	   All Examples

 /*
** Declare a variable of the type
** Listofchar, then create the List
*/
PROCEDURE my_proc IS
  my_List List.Listofchar;
BEGIN
  my_List := List.Make;
END;


List.Make

  Examples	   Related Topics 	   All Built-ins

Description  Creates a new, empty List.  A List Must be created before it can be used.

Syntax

FUNCTION List.Make
RETURN Listofchar;

Usage Notes  Any Lists created with this function should be destroyed with the List.Destroy procedure.


List.Make example

  Related Topics	   All Examples

 /*
** Create a List Of the type Listofchar
*/
PROCEDURE my_proc IS
  my_List List.Listofchar;
BEGIN
  my_List := List.Make;
END;


List.Nitems

  Examples	   Related Topics 	   All Built-ins

Description  Returns the number of items in the List.

Syntax

FUNCTION List.Nitems
   (List Listofchar)
RETURN PLS_INTEGER;

Parameters

List	A List.


List.Nitems example

  Related Topics	   All Examples

 /*
** For each item in my_List, retrieve the
** value of the item and print it out
*/
PROCEDURE print_List Is
BEGIN
  FOR i IN 0..List.Nitems(my_pkg.my_List)-1 LOOP
    Text_IO.Put_Line(List.Getitem(my_pkg.my_List, i));
  END LOOP;
END;


List.Prependitem

  Examples	   Related Topics 	   All Built-ins

Description  Adds a List Item to the beginning of a List.

Syntax

PROCEDURE List.Prependitem
   (List Listofchar),
    item VARCHAR2);

Parameters

List	A List.
item	A List Item.


List.Prependitem example

  Related Topics	   All Examples

 /*
** Insert a string to the beginning of my_List
** then retrieve it and print it out
*/
PROCEDURE prepend(my_List List.Listofchars) IS
BEGIN
  List.Prependitem(my_List, 'This is the first item.');
  Text_IO.Put_Line(List.Getitem(my_List, 0));
END;


ORA_NLS package

  Related Topics 	  All Built-ins

Ora_Nls.American

Ora_Nls.American_Date

Ora_Nls.Bad_Attribute

Ora_Nls.Get_Lang_Scalar

Ora_Nls.Get_Lang_Str

Ora_Nls.Linguistic_Collate

Ora_Nls.Linguistic_Specials

Ora_Nls.Modified_Date_Fmt

Ora_Nls.No_Item

Ora_Nls.Not_Found

Ora_Nls.Right to Left

Ora_Nls.Simple_Cs

Ora_Nls.Single_Byte


Ora_Nls.American

  Examples	   Related Topics 	   All Built-ins

Description  Returns TRUE or FALSE, depending on whether the current character set is "American".

Syntax

FUNCTION Ora_Nls.American
RETURN BOOLEAN;

Returns  TRUE or FALSE.


Ora_Nls.American example

  Related Topics	   All Examples

 /*
** Determine if you're dealing with an American
** set or not
*/
PROCEDURE is_american (out Text_IO.File_Type) IS
  us  BOOLEAN;
BEGIN
  us := Ora_Nls.American;
  IF us = TRUE
    Text_IO.Put (out, 'Character set it American');
  ELSE
    change_char_set;
  ENDIF
END;


Ora_Nls.American_Date

  Examples	   Related Topics 	   All Built-ins

Description  Returns TRUE or FALSE, depending on whether the current date format is "American".

Syntax

FUNCTION Ora_Nls.American_Date
RETURN BOOLEAN;

Returns  TRUE or FALSE.


Ora_Nls.American_Date example

  Related Topics	   All Examples

 /*
** Determine if date format is American
*/
PROCEDURE is_amerdate (out Text_IO.File_Type) IS
  usd  BOOLEAN;
BEGIN
  usd := Ora_Nls.American_Date;
  IF usd = TRUE
    Text_IO.Put (out, 'Date format is American');
  ELSE
    change_date_to_us;
  ENDIF
END;


Ora_Nls.Bad_Attribute

  Examples	   Related Topics 	   All Built-ins

Description  Raised when no attribute is supplied to Ora_Nls.Get_Lang_Scalar or Ora_Nls.Get_Lang_Str.

Syntax

Ora_Nls.Bad_Attribute  EXCEPTION;


Ora_Nls.Bad_Attribute example

  Related Topics	   All Examples

 /*
** Handle the Bad Attribute exception
*/
EXCEPTION
  WHEN Ora_Nls.Bad_Attribute THEN
    Text_IO.Put_Line('Check calls to Get_Lang_Scalar
      and Get_Lang_Str.  A bad attribute name was found.');


Ora_Nls.Get_Lang_Scalar

  Examples	   Related Topics 	   All Built-ins

Description  Returns the requested information about the current language.  You can use GET_LANG_SCALAR to retrieve numeric data.

Syntax

FUNCTION Ora_Nls.Get_Lang_Scalar
   (attribute PLS_INTEGER)
RETURN NUMBER;

Parameters

attribute	An Ora_Nls Constant or its associated integer value.  For a List Of constants, see Ora_Nls Constants.
Returns  A number.


Ora_Nls.Get_Lang_Scalar example

  Related Topics	   All Examples

 /*
** Retrieve and print out the language number
*/
BEGIN lang_num (out Text_IO.File_Type)
  lang_num  NUMBER;
BEGIN
  lang_num := Ora_Nls.Get_Lang_Scalar
    (Ora_Nls.Iso_Alphabet);
  Text_IO.Putf (out, "Current Language numer is %s\n",
    lang_num);
END;


Ora_Nls.Get_Lang_Str

  Examples	   Related Topics 	   All Built-ins

Description  Returns the requested information about the current language.  You can use GET_LANG_STR to retrieve character information.

Syntax

FUNCTION Ora_Nls.Get_Lang_Str
   (attribute PLS_INTEGER)
RETURN VARCHAR2;

Parameters

attribute	An Ora_Nls Constant or its associated integer value.  For a List Of constants, see Ora_Nls Constants.
Returns  A character value.


Ora_Nls.Get_Lang_Str example

  Related Topics	   All Examples

 /*
** Retrieve and print out the language name
*/
BEGIN lang_name (out Text_IO.File_Type)
  lang_name  VARCHAR2(80);
BEGIN
  lang_name := Ora_Nls.Get_Lang_Str
    (Ora_Nls.Language);
  Text_IO.Putf (out, "Current Language is %s\n",
    lang_name);
END;


Ora_Nls.Linguistic_Collate

  Examples	   Related Topics 	   All Built-ins

Description  Returns TRUE or FALSE, depending on whether the characters in the current character set need to be collated according to special linguistic information.

Syntax

FUNCTION Ora_Nls.Linguistic_Collate
RETURN BOOLEAN;

Returns  TRUE or FALSE.

Usage Notes  If this function returns TRUE, a binary sort of two characters will not necessarily return the correct value.  This is because encoding schemes for character sets do not necessarily define all characters in ascending numerical order.

In addition, the sort position of a character may vary for different languages.  For example, an "ä" is sorted before "b" in German, but after "z" in Swedish.


Ora_Nls.Linguistic_Collate example

  Related Topics	   All Examples

 /*
** Determine whether or not special collating is
** needed.
*/
collate := Ora_Nls.Linguistic_Collate;
  IF collate = TRUE THEN
    lang_name (langinfo.txt);
    Text_IO.Put ('This needs special collating.');
  ENDIF;


Ora_Nls.Linguistic_Specials

  Examples	   Related Topics 	   All Built-ins

Description  Returns true or false, depending on whether there are linguistic specials in use.

Syntax

FUNCTION Ora_Nls.Linguistic_Specials
RETURN BOOLEAN;

Returns  TRUE or FALSE.

Usage Notes  Linguistic specials are language-specific special cases for collation and case conversion (upper and lower).  An example The uppercase for the German sharp "s" (one byte), which is "SS" (two bytes).  Sorting Also done according to the two-byte value.

Linguistic specials are defined in a linguistic definition along with normal collation.  When there are linguistic specials defined for the linguistic definition that is in effect for a specific language handle, output sizes of functions handling linguistic specials can be larger than input string sizes.


Ora_Nls.Linguistic_Specials example

  Related Topics	   All Examples

 /*
** Determine whether or not specials are in use
** and how to deal with them if so
*/
specials := Ora_Nls.Linguistic_Specials;
  IF specials = TRUE THEN
    lang_name (langinfo.txt);
    Text_IO.Put ('Specials are in use.');
  ENDIF;


Ora_Nls.Modified_Date_Fmt

  Examples	   Related Topics 	   All Built-ins

Description  Returns true or false, depending on whether the date format has been modified.

Syntax

FUNCTION Ora_Nls.Modified_Date_Fmt
RETURN BOOLEAN;

Returns  TRUE or FALSE.


Ora_Nls.Modified_Date_Fmt example

  Related Topics	   All Examples

 /*
** Determine whether or not the date format has been
** modified
*/
modify := Ora_Nls.Modified_Date_Fmt;
IF modify = TRUE
  Text_IO.Putf (langinfo.txt, 'The date format
    has been modified.');
ENDIF;


Ora_Nls.No_Item

  Examples	   Related Topics 	   All Built-ins

Description  Raised when a user-supplied attribute cannot be located in the List Of attributes constants.

Syntax

Ora_Nls.No_Item  EXCEPTION;


Ora_Nls.No_Item example

  Related Topics	   All Examples

 /*
** Hand the exception for an unidentified attribute constant
*/
EXCEPTION
  WHEN Ora.Nls.No_Item THEN
    Text_IO.Put ('An attribute supplied is not valid.');


Ora_Nls.Not_Found

  Examples	   Related Topics 	   All Built-ins

Description  This exception is raised when a requested item cannot be found.  This is most likely caused by using Ora_Nls.Get_Lang_Scalar to retrieve character information, or by using Ora_Nls.Get_Lang_Str to retrieve numeric information.

Syntax

Ora_Nls.Not_Found  EXCEPTION;


Ora_Nls.Not_Found example

  Related Topics	   All Examples

/*
** Hand the exception for an item that was not found
*/
EXCEPTION
  WHEN Ora.Nls.Not_Found THEN
    Text_IO.Put ('The item was not found, check calls to Get_Lang.');


Ora_Nls.Right_to_Left

  Examples	   Related Topics 	   All Built-ins

Description  Returns true or false, depending on whether the writing direction of the current language is "right-to-left".

Syntax

FUNCTION Ora_Nls.Right_To_Left
RETURN BOOLEAN;

Returns  TRUE or FALSE.


Ora_Nls.Right_To_Left example

  Related Topics	   All Examples

 /*
** Verify that the language is a right-to-left language
*/
rtl := Ora_Nls.Right_To_Left;
IF rtl = FALSE
  Text_IO.Put (langinfo.txt, 'This is not a right to left
    language.');
ENDIF;


Ora_Nls.Simple_Cs

  Examples	   Related Topics 	   All Built-ins

Description  Returns true or false, depending on whether the current character set is simple (i.e., single-byte, no special characters, no special handling).

Syntax

FUNCTION Ora_Nls.Simple_Cs
RETURN BOOLEAN;

Returns  TRUE or FALSE.


Ora_Nls.Simple_Cs example

  Related Topics	   All Examples

 /*
**  Determine if the language is simple or not
*/
simplecs := Ora_Nls.Simple_Cs;
IF simplecs = TRUE
  lang_name (langinfo.txt);
  Text_IO.Put ('This language uses a simple
    character set.');
ELSE
  lang_name (langinfo.txt);
  Text_IO.Put ('This language uses a complex
    character set.');
ENDIF;


Ora_Nls.Single_Byte

  Examples	   Related Topics 	   All Built-ins

Description  Returns true or false, depending on whether all of the characters in the current character set can be represented in one byte.

Syntax

FUNCTION Ora_Nls.Single_Byte
RETURN BOOLEAN;

Returns  TRUE or FALSE.


Ora_Nls.Single_Byte example

  Related Topics	   All Examples

 /*
** Determine if the character set is single or multi-byte
*/
bytes := Ora_Nls.Single_Byte;
IF bytes = FALSE
  lang_name (langinfo.txt);
  Text_IO.Put ('This is a multi-byte character set.');
END IF;


ORA_FFI package

  Related Topics 	  All Built-ins

Ora_Ffi.Ffi_Error

Ora_Ffi.Find_Function

Ora_Ffi.Find_Library

Ora_Ffi.Funchandletype

Ora_Ffi.Generate_Foreign

Ora_Ffi.Is_Null_Ptr

Ora_Ffi.Libhandletype

Ora_Ffi.Load_Library

Ora_Ffi.Pointertype

Ora_Ffi.Register_Function

Ora_Ffi.Register_Parameter

Ora_Ffi.Register_Return

Ora_Ffi.Unload_Library

Ora_Ffi Example 1A

Ora_Ffi Example 1B

Ora_Ffi Example 2


Ora_Ffi.Ffi_Error

  Examples	   Related Topics 	   All Built-ins

Description  Raised when an error occurs while using the Ora_Ffi Package.

Syntax

EXCEPTION  Ora_Ffi_Error;


Ora_Ffi.Ffi_Error example

  Related Topics	   All Examples

/* This example uses Ora_Ffi_Error */

PRODEDURE register_libs IS
   testlib_lhandle ora_ffi.libhandletype;
BEGIN
   /* Attempt to load a dll library
      from a non-existant directory*/
   testlib_lhandle := ora_ffi.load_library
             ('C:\baddir\', 'libtest.dll');
EXCEPTION
   WHEN Ora_Ffi.Ffi_Error THEN
      /* print error message */
      text_io.put_line(tool_err.message);
      /* discard the error */
      tool_err.pop;
END;


Ora_Ffi.Find_Function

  Examples	   Related Topics 	   All Built-ins

Description  Locates and returns the function handle for the specified function.  You can retrieve the function handle by specifying either a function name or a library name.  The function must previously have been registered with Ora_Ffi.Register_Function.

Syntax

FUNCTION Ora_Ffi.Find_Function
   (libHandle  libHandleType,
    funcname   VARCHAR2)
RETURN funcHandleType;

FUNCTION Ora_Ffi.Find_Function
   (libname   VARCHAR2,
    funcname  VARCHAR2)
RETURN funcHandleType;

Parameters

libHandle	A library handle returned by Ora_Ffi.Load_Library or Ora_Ffi.Find_Library.
funcname	The name of the function to be located.
libname	The name of the library the function is in.
Returns  A handle to the specified function.


Ora_Ffi.Find_Function example

  Related Topics	   All Examples

/* Find foreign function handle for
   a given foreign library handle and
   foreign function name */

BEGIN
   ...
   funchandle := ora_ffi.find_function
            (libhandle, 'my_func');
   ...
END;

/* Find foreign function handle for
   a given foreign function and
   foreign library names */
BEGIN
   ...
   funchandle := ora_ffi.find_function
            (libhandle, 'my_func');
   ...
END;


Ora_Ffi.Find_Library

  Examples	   Related Topics 	   All Built-ins

Description  Locates and returns the handle for the specified foreign library name.  The library must previously have been registered with Ora_Ffi.Load_Library.

Syntax

FUNCTION Ora_Ffi.Find_Library (libname VARCHAR2)
RETURN libHandleType;

Parameters

libname	The name of the library.
Returns  A handle to the specified foreign library.


Ora_Ffi.Find_Library example

  Related Topics	   All Examples

/* Find foreign library handle for
   a given library name */

BEGIN
   ...
   libhandle := ora_ffi.find_library
            ('mylib.dll');
   ...
END;


Ora_Ffi.Funchandletype

  Examples 	   Related Topics 	   All Built-ins

Description  Specifies a handle to a foreign function.  You can use Ora_Ffi.Find_Function to obtain the handle.

Syntax

TYPE Ora_Ffi.Funchandletype;


Ora_Ffi.Funchandletype example

  Related Topics	   All Examples

/* This example uses Ora_Ffi_Funchandletype */

PROCEDURE define_c_funcs IS
   getresult_fhandle  ora_ffi.funcHandleType;
   foo_fhandle        ora_ffi.funcHandleType;
BEGIN
   /* Register the info for function getresult */
   getresult_fhandle := ora_ffi.register_function
             (testlib_lhandle, 'getresult');
   ...
   /* Register the info for function foo */
   foo_fhandle := ora_ffi.register_function
             (testlib_lhandle,'foo');
   ...
END;


Ora_Ffi.Generate_Foreign

  Examples	   Related Topics 	   All Built-ins

Description  Generates a package of PL/SQL code for all the functions defined in the specified library.  You must first load the library, register all of the functions you want to invoke, and register their parameter and return values.

Syntax

PROCEDURE Ora_Ffi.Generate_Foreign
   (handle libHandleType);

PROCEDURE Ora_Ffi.Generate_Foreign
   (handle  libHandleType,
    pkgname VARCHAR2);

Parameters

handle	A library handle returned by Ora_Ffi.LoadLibrary or Ora_Ffi.Find_Library.
pkgname	The name of the package to be generated.   If you do not specify a package name, the name of the library, prefixed with FFI_, is used.  For example, if the library name is LIBTEST, the package name will be FFI_LIBTEST.
Usage Notes

•	Packages generated by the Ora_Ffi.Generate.Foreign function are created in your current name space and will appear under the Program Units node of the Procedure Builder Object Navigator. Once a package has been generated, you can copy it to the Program Units node of a PL/SQL Library or to the Stored Program Units node of a database, and you can export it to a text file using File [image] Export, just like any other new package or procedure that you have defined.

•	A PL/SQL package generated by the Ora_Ffi.Generate_Foreign function automatically includes the required PRAGMA compiler directives for each of the registered functions:

PRAGMA interface (C, func_name, 11265);

where func_name is the name of a registered foreign function from a dll library that has already been loaded. You can specify the name of the generated PL/SQL package, but within that package, each of the entry points will match the names of the foreign functions they map to.


Ora_Ffi.Generate_Foreign example

  Related Topics	   All Examples

/* Define components of package test */

PACKAGE test IS
...
END;

/*Define package body procedures */
PACKAGE BODY test IS
   PRODEDURE register_libs IS
   BEGIN
      /* Load the test library */
      testlib_lhandle := Ora_Ffi_.load_library
        ('c:\orawin95\oralibs\','testlib.dll')
   END;

   PROCEDURE define_c_funcs IS
      getresult_fhandle Ora_Ffi.Funchandletype;
      foo_handle        Ora_Ffi.Funchandletype;
   BEGIN
      /* Register the info for function getresult */
      getresult_fhandle := ora_ffi.register_function
            (testlib_lhandle,'getresult');
      ...
      /* Register the info for function foo */
      foo_fhandle := ora_ffi.register_function
            (testlib_lhandle,'foo');
      ...
      /* Generate PL/SQL package containing all
         functions defined in test library */
      ora_ffi.generate_foreign
            (testlib_lhandle, 'test_ffi_pkg');
      ...
   END;
END;


Ora_Ffi.Is_Null_Ptr

  Examples	   Related Topics 	   All Built-ins

Description  Determines whether a library, function, or pointer handle is null.

Syntax

FUNCTION Ora_Ffi.Is_Null_Ptr (handle libHandleType)
RETURN BOOLEAN;

FUNCTION Ora_Ffi.Is_Null_Ptr (handle  funcHandleType)
RETURN BOOLEAN;

FUNCTION Ora_Ffi.Is_Null_Ptr (handle  pointerType)
RETURN BOOLEAN;

Parameters

handle	The library, function, or pointer to evaluate.
Returns

TRUE	If the handle is null.
FALSE	If the handle is not null.


Ora_Ffi.Is_Null_Ptr example

  Related Topics	   All Examples

/* This example uses Ora_Ffi.Is_Null_Ptr */

PROCEDURE register_libs IS
...
BEGIN
   /* Load foreign function library */
   libhandle := Ora_Ffi.load_library
      ('C:\oralibs\', 'libfoo.dll');
   /* Test whether library is null */
   IF (ora_ffi.is_null_ptr(libhandle)) THEN
   ...
END;


Ora_Ffi.Libhandletype

  Examples 	   Related Topics 	   All Built-ins

Description  Specifies a handle to a foreign function.  Use Ora_Ffi.Find_Function to obtain the handle.

Syntax

TYPE Ora_Ffi.Libhandletype;


Ora_Ffi.Libhandletype example

  Related Topics	   All Examples

/* This example uses Ora_Ffi.Libhandletype */

PACKAGE test is
   /* Specify that testlib_lhandle
      is a library handle varible type */
   testlib_lhandle  ora_ffi.libHandleType;
   ...
END;

PACKAGE BODY test IS
   PROCEDURE register_libs IS
   BEGIN
      testlib_lhandle := Ora_Ffi.Load_library
          ('C:\libdir\','test.dll');
      ...
   END;
   ...
END;


Ora_Ffi.Load_Library

  Examples 	   Related Topics 	   All Built-ins

Description  Loads a specified dynamic library so that its functions can be registered.

Syntax

FUNCTION Ora_Ffi.Load_Library
   (dirname VARCHAR2,
    libname VARCHAR2)
RETURN libHandleType;

Parameters

dirname	The directory in which the library is located.
libname	The filename of the library.
Returns  A handle to the foreign library.  It returns a null handle if the library was unable to be found or loaded.


Ora_Ffi.Load_Library example

  Related Topics	   All Examples

/* This example uses Ora_Ffi.Load_Library */

PACKAGE test is
   /* Declare testlib_lhandle as an Ora_Ffi
      library handle varible type. */
   testlib_lhandle  ora_ffi.libHandleType;
   ...
END;

PACKAGE BODY test IS
   PROCEDURE register_libs IS
   BEGIN
      /* Load the dynamic link library 'test.dll'
         from the directory C:\libdir\ and return
         the handle testlib_lhandle. */
      testlib_lhandle := Ora_Ffi.Load_library
            ('C:\libdir\','test.dll');
   ...
   END;
   ...
 END;


Ora_Ffi.Pointertype

  Examples 	   Related Topics 	   All Built-ins

Description  Can assume the value of a generic C pointer (i.e., a pointer of unspecified type).

Syntax

TYPE Ora_Ffi.Pointertype;


Ora_Ffi.Pointertype example

  Related Topics	   All Examples

/* This example uses Ora_Ffi.Pointertype */

PACKAGE imglib IS
   /* Declare Function get_image which
      returns a generic C pointer. */
   FUNCTION get_image(ikey IN OUT VARCHAR2)
     RETURN Ora_Ffi.Pointertype ;
   /* Declare Procedure show_image with parameter
      idata which is a generic C pointer.*/
   PROCEDURE show_image(idata Ora_Ffi.Pointertype,
                        iscale NUMBER);
END;
...

PROCEDURE display_image(keywrd IN OUT VARCHAR2) IS
   /* Declare img_ptr as a generic C pointer type */
   img_ptr Ora_Ffi.Pointertype;
BEGIN
   img_ptr := imglib.get_image(keywrd);
   imglib.show_image(img_ptr,2);
END;


Ora_Ffi.Register_Function

  Examples 	   Related Topics 	   All Built-ins

Description  Registers a specified foreign function.

Syntax

FUNCTION Ora_Ffi.Register_Function
  (libHandle  libHandleType,
   funcname   VARCHAR2,
   callstd    NUMBER   := C_STD)
RETURN funcHandleType;

Parameters

libHandle	A library handle returned by Ora_Ffi.Load_Library or Ora_Ffi.Find_Library.
funcname	The name of the function to be registered..
callstd	The calling used by the foreign function. (For more information, refer to your compiler documentation.)  The value of this argument may be one of the following packaged constants:
C_STD   Means the foreign function uses the C calling standard.

PASCAL_STD   Means the foreign function uses the Pascal calling standard.

Returns  A handle to the foreign function.


Ora_Ffi.Register_Function example

  Related Topics	   All Examples

/* Define Procedure define_c_funcs which calls two
   Ora_Ffi functions, getresult and foo. */

PROCEDURE define_c_funcs is
   getresult_fhandle  ora_ffi.funcHandleType;
   foo_fhandle        ora_ffi.funcHandleType;
BEGIN
   /* Register the info for function getresult */
   getresult_fhandle := ora_ffi.register_function
            (testlib_lhandle,'getresult');
   ...

   /* Register the info for function foo */
   foo_fhandle := ora_ffi.register_function
            (testlib_lhandle,'foo');
   ...
   /* Generate PL/SQL package containing all
      functions defined in test library */
   ora_ffi.generate_foreign
            (testlib_lhandle, 'test_ffi_pkg');
   ...
END;


Ora_Ffi.Register_Parameter

  Examples 	   Related Topics 	   All Built-ins

Description  Registers the argument type of the current argument of the specified foreign function.

Syntax

PROCEDURE Ora_Ffi.Register_Parameter
   (funcHandle funcHandleType,
    cargtype   PLS_INTEGER);

PROCEDURE Ora_Ffi.Register_Parameter
   (funcHandle funcHandleType,
    cargtype   PLS_INTEGER,
    plsargtype PLS_INTEGER);

Parameters

funcHandle	A function handle returned by Ora_Ffi.Register_Function or Ora_Ffi.Find_Function.
cargtype	The C datatype of the current argument to the C foreign function being called.  The value of this argument may be one of the following packaged constants: C_CHAR   Means char C_CHAR_PTR   Means char * C_DOUBLE   Means double C_DOUBLE_PTR   Means double * C_FLOAT   Means float C_FLOAT_PTR   Means float * C_INT   Means int C_INT_PTR   Means int * C_LONG   Means long C_LONG_PTR   Means long * C_SHORT   Means short C_SHORT_PTR   Means short * C_VOID_PTR   Means void *
plsargtype	The corresponding PL/SQL argument type (optional).


Ora_Ffi.Register_Parameter example

  Related Topics	   All Examples

/* Define Procedure define_c_funcs which calls two
   Ora_Ffi functions, getresult and foo. */

PROCEDURE define_c_funcs is
   getresult_fhandle   ora_ffi.funcHandleType;
   foo_fhandle         ora_ffi.funcHandleType;

BEGIN
   /* Register the info for function getresult */
   getresult_fhandle := ora_ffi.register_function
            (testlib_lhandle,'getresult');
  ...
   /* Register the info for function foo */
   foo_fhandle := ora_ffi.register_function
            (testlib_lhandle,'foo');
   /* Register the return type for function foo */
   ora_ffi.register_return
            (foo_fhandle, ora_ffi.C_SHORT);
   /* Register the parameter info for function foo */
   ora_ffi.register_parameter
            (foo_fhandle, ora_ffi.C_FLOAT);
   ora_ffi.register_parameter
            (foo_fhandle, ora_ffi.C_INT);
   ora_ffi.register_parameter
            (foo_fhandle, ora_ffi.C_CHAR_PTR);

   /* Generate PL/SQL package containing all functions
         defined in test library */
   ora_ffi.generate_foreign
            (testlib_lhandle, 'test_ffi_pkg');
   ...
END;


Ora_Ffi.Register_Return

  Examples 	   Related Topics 	   All Built-ins

Description  Registers the return type of the specified foreign function.

Syntax

PROCEDURE Ora_Ffi.Register_Return
   (funcHandle  funcHandleType,
    creturntype PLS_INTEGER);

PROCEDURE Ora_Ffi.Register_Return
   (funcHandle  funcHandleType,
    creturntype PLS_INTEGER,
    plsreturntype PLS_INTEGER);

Parameters

funcHandle	A function handle returned by Ora_Ffi.Register_Function or Ora_Ffi.Find_Function.
creturntype	The C datatype returned by the foreign function.  The value of this argument may be one of the following packaged constants: C_CHAR   Means char C_CHAR_PTR   Means char * C_DOUBLE   Means double C_DOUBLE_PTR   Means double * C_FLOAT   Means float C_FLOAT_PTR   Means float * C_INT   Means int C_INT_PTR   Means int * C_LONG   Means long C_LONG_PTR   Means long * C_SHORT   Means short C_SHORT_PTR   Means short * C_VOID_PTR   Means void *
plsreturntype	The corresponding PL/SQL return type (optional).


Ora_Ffi.Register_Return example

  Related Topics	   All Examples

/* Define Procedure define_c_funcs which calls two
   Ora_Ffi functions, getresult and foo. */

PROCEDURE define_c_funcs is
   getresult_fhandle   ora_ffi.funcHandleType;
   foo_fhandle         ora_ffi.funcHandleType;

BEGIN
   /* Register the info for function getresult */
   getresult_fhandle := ora_ffi.register_function
            (testlib_lhandle,'getresult');
   /* Register the return type for function getresult */
   ora_ffi.register_return
            (getresult_fhandle, ora_ffi.C_CHAR_PTR);

   /* Register the info for function foo */
   foo_fhandle := ora_ffi.register_function
            (testlib_lhandle,'foo');
   /* Register the return type for function foo */
   ora_ffi.register_return
            (foo_fhandle, ora_ffi.C_SHORT);
   ...
   /* Generate PL/SQL package containing all
      functions defined in test library */
   ora_ffi.generate_foreign
             (testlib_lhandle, 'test_ffi_pkg');
   ...
END;


Ora_Ffi.Unload_Library

  Examples 	   Related Topics 	   All Built-ins

Description  Unloads the specified dynamic library.  The functions in the library will no longer be accessible until the library is loaded again.

Syntax

PROCEDURE Ora_Ffi.Unload_Library
   (libHandle  libHandleType);

Parameters

libHandle	A handle to the library to be unloaded.


Ora_Ffi.Unload_Library example

  Related Topics	   All Examples

/* First load a dll library */

PROCEDURE register_libs IS
   test_lib  Ora_Ffi.Libhandletype;
BEGIN
   /* Load the testlib.dll library
       from directory C:\libs\ */
   testlib_lhandle := ora_ffi.load_library
            ('C:\libs\', 'testlib.dll');
END;

/* Generate PL/SQL Package containing
   funtions from the test library. */

PROCEDURE define_c_funcs IS
   ...
   Ora_Ffi.Genereate_Foreign (testlib_lhandle,
           'test_Ffi_Pkg')';
   ...
END;

/* Unload the library */

PROCEDURE unload_libs IS
BEGIN
   /* Unload the dll library assigned to the
      library handle 'test_lib.' */
   Ora_Ffi.Unload_library(testlib_lhandle);
   ...
END;


Ora_Ffi Example 1A

  Related Topics 	   All Examples

Suppose you want to create an interface to the C function  pow, which is found in the Microsoft Windows runtime  llibrary:  C:\windows\system\msvcrt.dll. (The pow function raises x to the y power.)

int pow(int x, int y)

First, create a package specification that represents the  library and defines the PL/SQL function that you want to invoke:

PACKAGE mathlib IS
   FUNCTION pow(x NUMBER, y NUMBER)
     RETURN NUMBER;
END;

You would call the PL/SQL function mathlib.pow, defined above, to invoke the foreign function pow, from the dynamic library msvcrt.dll.

Notice that this subprogram does not require a handle to the library or foreign function.  For convenience, the various registrations are handled in the package body, defined below.

Note: This example uses a PRAGMA compiler directive  to tell the PL/SQL compiler that the function ff_to_power is actually to be compiled as a C function, rather than PL/SQL. Ora_Ffi Example 1B shows how to achieve the same result using the Ora_Ffi.Generate_Foreign function to generate a PL/SQL mathlib package.  In Example 1B,  the PRAGMA directive is handled automatically by the Ora_Ffi.Generate_Foreign function.

PACKAGE BODY mathlib IS
  /* Declare the library and function handles. */
  mathlib_lhandle   Ora_Ffi.Libhandletype ;
  to_power_fhandle  Ora_Ffi.Funchandletype ;

  /* Create the PL/SQL function that will actually */
  /* invoke the foreign function.                  */
  FUNCTION ff_to_power(fhandle Ora_Ffi.Funchandletype,
         x NUMBER, y NUMBER)RETURN NUMBER;
  PRAGMA interface(C, ff_to_power, 11265);

  /* Create the PL/SQL function that is defined in */
  /* the package spec.  This function simply       */
  /* passes along the arguments it receives to     */
  /* ff_to_power (defined above), prepending the   */
  /* foreign function handle to the argument List. */
  FUNCTION pow(x NUMBER, y NUMBER) RETURN NUMBER IS
  BEGIN
    RETURN(ff_to_power(to_power_fhandle, x, y));
  END pow;

/* Define the body of package mathlib */
BEGIN

  /* Load the library. */
  mathlib_lhandle := Ora_Ffi.Load_Library
         ('C:\WINDOWS\SYSTEM\', 'msvcrt.dll');

  /* Register the foreign function. */
  to_power_fhandle := Ora_Ffi.Register_Function
         (mathlib_lhandle, 'pow', Ora_Ffi.C_Std);

  /* Register both parameters of function to_power. */
  Ora_Ffi.Register_Parameter (to_power_fhandle,
                             Ora_Ffi.C_DOUBLE);
  Ora_Ffi.Register_Parameter(to_power_fhandle,
                             Ora_Ffi.C_DOUBLE);

  /* Register the return type. */
  Ora_Ffi.Register_Return (to_power_fhandle, Ora_Ffi.C_DOUBLE);

END;  /* Package Body Mathlib */

To invoke the C  function pow from mscvrt.dll, you simply call the PL/SQL  function pow, defined in the mathlib package specification.  For example:

PL/SQL>

PROCEDURE raise_to_power (a in number, b in number) IS
   BEGIN
      text_io.put_line(mathlib.pow(a,b));
   END;

PL/SQL> raise_to_power(2,9);

512


Ora_Ffi Example 1B

  Related Topics	   All Examples

Here is an alternative way to implement the C function pow, shown in Ora_Ffi Example 1A.  This example uses the Ora_Ffi.Generate_Foreign function to generate a PL/SQL package.  The  PRAGMA compiler directive, necessary to compile the foreign C function, is automatically included in the generated package, so  it is not used in the package body below.

/* Create package mathlib that will generate a PL/SQL
package using a foreign file C function to raise a
number to a power. The parameter, pkg_name, lets you
specify the name of the generated package. */
PACKAGE mathgen IS
   PROCEDURE gen(pkg_name IN VARCHAR2);
END;

PACKAGE BODY mathgen IS
   /* Define the 'gen' procedure that will generate the
      foreign file package. */
   PROCEDURE gen(pkg_name IN VARCHAR2) IS
      /* Declare the library and function handles. */
      mathlib_lhandle   Ora_Ffi.Libhandletype ;
      to_power_fhandle  Ora_Ffi.Funchandletype ;

   BEGIN   /* package body mathlib */
      /* Load the library. */
      mathlib_lhandle := Ora_Ffi.Load_Library
         ('C:\WINDOWS\SYSTEM\', 'msvcrt.dll');

      /* Register the foreign function. */
      to_power_fhandle := Ora_Ffi.Register_Function
         (mathlib_lhandle, 'pow', Ora_Ffi.C_Std);

      /* Register both parameters of the foreign function. */
      Ora_Ffi.Register_Parameter (to_power_fhandle,
                             Ora_Ffi.C_DOUBLE);
      Ora_Ffi.Register_Parameter(to_power_fhandle,
                             Ora_Ffi.C_DOUBLE);

      /* Register the return type of the foreign function. */
      Ora_Ffi.Register_Return (to_power_fhandle, Ora_Ffi.C_DOUBLE);

      /* Generate a PL/SQL package containing the foreign C function,
         'pow.' You can name the new package by specifying a value
          for the parameter, pkg_name, when you generate the package. */
      Ora_Ffi.generate_foreign(mathlib_lhandle, pkg_name);

   END; /* Procedure gen */
END; /* Package Body mathgen */

To raise a number to a power with this method,  you must first generate a Pl/SQL package using package mathgen and procedure gen.  For example, if the generated PL/SQL power package is called mathlib, you would generate it as follows:

PL/SQL> mathgen.gen('mathlib');

Then, to invoke the power function from package mathlib, you might write a procedure such as:

PROCEDURE raise_to_power (a in number, b in number) IS
   BEGIN
      text_io.put_line(mathlib.pow(a,b));
   END;

PL/SQL> raise_to_power(5,2);

25


Ora_Ffi Example 2

  Related Topics	   All Examples

Suppose you want to create an interface to the following C functions, which are located in the library C:\oralibs\imglib.dll:

void *get_image(char *imgkey)
void show_image(void *binimage, float iscale)

Assume that the function get_image uses a keyword argument to load  image data, and then returns a generic pointer (i.e., a pointer of unspecified type) to that binary data.  You then pass the pointer and a scaling factor to show_image, which displays the image on the screen.

First, create a package specification that represents the library and defines the PL/SQL functions that you want to invoke:

PACKAGE imglib IS
  FUNCTION get_image(ikey IN OUT VARCHAR2)
    RETURN Ora_Ffi.pointerType;

  PROCEDURE show_image(idata Ora_Ffi.pointerType,
                       iscale NUMBER);
END;   /* package imglib */

The package body is defined below:

PACKAGE BODY imglib IS
  /* Declare the library and function handles. */
  imglib_lhandle      Ora_Ffi.libHandleType;
  get_image_fhandle   Ora_Ffi.funcHandleType;
  show_image_fhandle  Ora_Ffi.funcHandleType;

  /* Create the PL/SQL function that will actually  */
  /* invoke the 'get_image' foreign function.       */
  FUNCTION ff_get_image(fhandle Ora_Ffi.funcHandleType,
                        ikey IN OUT VARCHAR2)
    RETURN Ora_Ffi.handleType;
    PRAGMA interface(C, ff_get_image, 11265);

  /* Create the 'get_image' PL/SQL function that is */
  /* defined in the package spec.                   */
  FUNCTION get_image(ikey IN OUT VARCHAR2)
    RETURN Ora_Ffi.pointerType IS
    ptr Ora_Ffi.pointerType;
  BEGIN
    ptr.handle := ff_get_image(get_image_fhandle, ikey);
    RETURN(ptr);
  END;   /* function get_image */

  /* Create the PL/SQL procedure that will actually */
  /* invoke the 'show_image' foreign function.      */
  PROCEDURE ff_show_image(fhandle Ora_Ffi.funcHandleType,
                          idata Ora_Ffi.handleType,
                          iscale NUMBER);
    PRAGMA interface(C, ff_show_image, 11265);

  /* Create the 'show_image' PL/SQL procedure that is */
  /* defined in the package spec.                     */
  PROCEDURE show_image(idata Ora_Ffi.pointerType,
                       iscale NUMBER) IS
  BEGIN
    ff_show_image(show_image_fhandle, idata.handle, iscale);
  END;   /* procedure show_image */

BEGIN   /* package body imglib */

  /* Load the library. */
  imglib_lhandle := Ora_Ffi.Load_Library
         ('C:\oralibs\', 'imglib.dll');

  /* Register the foreign functions. */
  get_image_fhandle := Ora_Ffi.Register_Function
         (imglib_lhandle, 'get_image', Ora_Ffi.C_Std);
  show_image_fhandle := Ora_Ffi.Register_Function
         (imglib_lhandle, 'show_image', Ora_Ffi.C_Std);

  /* Register the parameters. */
  Ora_Ffi.Register_Parameter(get_image_fhandle,
                             Ora_Ffi.C_Char_Ptr);

  Ora_Ffi.Register_Parameter(show_image_fhandle,
                             Ora_Ffi.C_Void_Ptr);
  Ora_Ffi.Register_Parameter(show_image_fhandle,
                             Ora_Ffi.C_Float);

  /* Register the return type ('get_image' only). */
  Ora_Ffi.Register_Return(get_image_fhandle,
                          Ora_Ffi.C_Void_Ptr);

END;   /* package body imglib */

To invoke the foreign functions, you would call the PL/SQL procedures defined in the package specification, as in the following example:

PROCEDURE display_image(keywrd IN OUT VARCHAR2) IS
  img_ptr  Ora_Ffi.Pointertype;
BEGIN
  img_ptr := imglib.get_image(keywrd);
  imglib.show_image(img_ptr, 2);
END;   /* procedure display_image */


OLE2 package

  Related Topics 	  All Built-ins

OLE2.Add_Arg

OLE2.Add_Arg_Obj

OLE2.Create_Arglist

OLE2.Create_Obj

OLE2.Destroy_Arglist

OLE2.Get_Char_Property

OLE2.Get_Num_Property

OLE2.Get_Obj_Property

OLE2.Invoke

OLE2.Invoke_Num

OLE2.Invoke_Char

OLE2.Invoke_Obj

OLE2.IsSupported

OLE2.Last_Exception

OLE2.List_Type

OLE2.Obj_Type

OLE2.OLE_Error

OLE2.OLE_Not_Supported

OLE2.Release_Obj

OLE2.Set_Property


OLE2.Add_Arg

  Examples	   Related Topics 	   All Built-ins

Description  Appends an argument to an argument List created with OLE2.Create_Arglist.

Syntax

PROCEDURE OLE2.Add_Arg
   (List  List_Type,
    value NUMBER);

PROCEDURE OLE2.Add_Arg
   (List  List_Type,
    value VARCHAR2);

Parameters

List	The name of an argument List assigned to the OLE2.Create_Arglist Function.
value	The argument value.
Usage Notes  The argument can be of the type NUMBER or VARCHAR2.


OLE2.Add_Arg example

  Related Topics	   All Examples

 /*
** Add an argument to my_Arglist
*/
OLE2.Add_Arg(my_Arglist, 'Sales Revenue');


OLE2.Add_Arg_Obj

  Examples	   Related Topics 	   All Built-ins

Description  Appends an object argument to an argument list created with OLE2.Create_Arglist.

Syntax

PROCEDURE OLE2.Add_Arg_Obj
   (List IN List_Type,
    value IN Obj_Type);

Parameters

List	A list handle returned from a call to the OLE2.Create_Arglist function.
value	The value of an Obj_Type argument to be passed to the OLE2 automation server.


OLE2.Add_Arg_Obj example

  Related Topics	   All Examples

 /*
** When the OLE interface must accept an unknown object
** as an argument instead of a pure scalar type, use the
** Add_Arg_Obj procedure.
*/
object = OLE2.CREATE_OBJ(obj_name);
listh := OLE2.CREATE_ARGLIST;

OLE2.ADD_ARG_OBJ(listh, object);


OLE2.Create_Arglist

  Examples	   Related Topics 	   All Built-ins

Description  Creates an argument List you can pass to the OLE2 Automation server.

Syntax

FUNCTION OLE2.Create_Arglist
RETURN List_Type;

Returns  A handle to an argument List.


OLE2.Create_Arglist example

  Related Topics	   All Examples

 /*
** Declare a variable of the type OLE2.List_Type
** then create the argument List Of that name
*/
  my_Arglist  OLE2.List_Type;
BEGIN
  my_Arglist := OLE2.Create_Arglist;
  OLE2.Add_Arg(my_Arglist, 'Sales Revenue');
END;


OLE2.Create_Obj

  Examples	   Related Topics 	   All Built-ins

Description  Creates an OLE2 Automation Object.

Syntax

FUNCTION OLE2.Create_Obj
   (object  VARCHAR2)
RETURN obj_type;

Parameters

object	An OLE2 Automation Object.
Returns  A handle to an OLE2 Automation Object.


OLE2.Create_Obj example

  Related Topics	   All Examples

 /*
** Create an OLE2 Object
*/
obj := OLE2.Create_Obj('Excel.Application.5');


OLE2.Destroy_Arglist

  Examples	   Related Topics 	   All Built-ins

Description  Destroys an argument List previously created with the OLE2.Create_Arglist Function.

Syntax

PROCEDURE OLE2.Destroy_Arglist
   (List List_Type);

Parameters

List	The name of an argument List assigned to the OLE2.Create_Arglist Function.


OLE2.Destroy_Arglist example

  Related Topics	   All Examples

 /*
** Destroy an argument list.
*/
OLE2.Destroy_Arglist(My_Arglist);


OLE2.Get_Char_Property

  Examples	   Related Topics 	   All Built-ins

Description  Gets a property of an OLE2 Automation Object.

Syntax

FUNCTION OLE2.Get_Char_Property
   (object   obj_type,
    property VARCHAR2,
    Arglist  List_Type := 0)
RETURN VARCHAR2;

Parameters

object	An OLE2 Automation Object.
property	The name of a property in an OLE2 Automation Object.
Arglist	The name of an argument List assigned to the OLE2.Create_Arglist Function.
Returns  A character value.


OLE2.Get_Char_Property example

  Related Topics	   All Examples

 /*
** Get the property for the object.
*/
str := OLE2.Get_Char_Property(obj, 'text');


OLE2.Get_Num_Property

  Examples	   Related Topics 	   All Built-ins

Description  Gets a number value from an OLE2 Automation Object.

Syntax

FUNCTION OLE2.Get_Num_Property
   (object   obj_type,
    property VARCHAR2,
    Arglist  List_Type := 0)
RETURN NUMBER;

Parameters

object	An OLE2 Automation Object.
property	The name of a property in an OLE2 Automation Object.
Arglist	The name of an argument List assigned to the OLE2.Create_Arglist Function.
Returns  A number value.


OLE2.Get_Num_Property example

  Related Topics	   All Examples

 /*
** Get the number value for the center of the map.
*/
x := OLE2.Get_Num_Property(Map,'GetMapCenterX');
y := OLE2.Get_Num_Property(Map,'GetMapCenterY');


OLE2.Get_Obj_Property

  Examples	   Related Topics 	   All Built-ins

Description  Gets an object type value from an OLE2 Automation Object.

Syntax

FUNCTION OLE2.Get_Obj_Property
   (object   obj_type,
    property VARCHAR2,
    Arglist  List_Type := 0)
RETURN OBJ_TYPE;

Parameters

object	An OLE2 Automation Object.
property	The name of an OLE2 Automation Object.
Arglist	The name of an argument List assigned to the OLE2.Create_Arglist Function.
Returns  An OLE2 Automation Object property.


OLE2.Get_Obj_Property example

  Related Topics	   All Examples

 /*
**Get the object type value for the spreadsheet object.
*/
the_obj:=OLE2.Get_Obj_Property(spreadsheet_obj,
'Application');


OLE2.Invoke

  Examples	   Related Topics 	   All Built-ins

Description  Invokes an OLE2 method.

Syntax

PROCEDURE OLE2.Invoke
   (object obj_type,
    method VARCHAR2,
    List   List_Type := 0);

Parameters

object	An OLE2 Automation Object.
method	A method (procedure) of the OLE2 Object.
List	The name of an argument List assigned to the OLE2.Create_Arglist Function.


OLE2.Invoke example
OOLE2.Invoke example

  Related Topics	   All Examples

 /*
**Invoke ZoomIn.
*/
OLE2.Invoke(Map, 'ZoomIn', my_Arglist);


OLE2.Invoke_Num

  Examples	   Related Topics 	   All Built-ins

Description  Gets a number value from an OLE2 Automation Object, using the specified method.

Syntax

FUNCTION OLE2.Invoke_Num
   (object   obj_type,
    method   VARCHAR2,
    Arglist  List_Type := 0)
RETURN NUMBER;

Parameters

object	An OLE2 Automation Object.
method	The name of an OLE2 Automation method (function) that returns a number value.
Arglist	The name of an argument List assigned to the OLE2.Create_Arglist Function.
Returns  A number value.


OLE2.Invoke_Num example

  Related Topics	   All Examples

 /*
**  Get the number value using the specified method.
*/
the_num:=OLE2.Invoke_Num (spreadsheet_obj, 'npv',
my_Arglist);


OLE2.Invoke_Char

  Examples	   Related Topics 	   All Built-ins

Description  Gets a character value from an OLE2 Automation Object using the specified method.

Syntax

FUNCTION OLE2.Invoke_Char
   (object   obj_type,
    method   VARCHAR2,
    Arglist  List_Type := 0)
RETURN VARCHAR2;

Parameters

object	An OLE2 Automation Object.
method	The name of an OLE2 Automation method (function) that returns a character value.
Arglist	The name of an argument List assigned to the OLE2.Create_Arglist Function.
Returns  A character value.


OLE2.Invoke_Char example

  Related Topics	   All Examples

 /*
** Get the character value for spell_obj.
*/
correct:=OLE2.Invoke_Char(spell_obj, 'spell', my_Arglist);


OLE2.Invoke_Obj

  Examples	   Related Topics 	   All Built-ins

Description  Gets an object type value from an OLE2 Automation Object.

Syntax

FUNCTION OLE2.Invoke_Obj
   (object   obj_type,
    method   VARCHAR2,
    Arglist  List_Type := 0)
RETURN OBJ_TYPE;

Parameters

object	An OLE2 Automation Object.
method	The name of an OLE2 Automation method to invoke.
Arglist	The name of an argument List assigned to the OLE2.Create_Arglist Function.
Returns  An OLE2 Automation Object.


OLE2.Invoke_Obj example

  Related Topics	   All Examples

 /*
** Get the object type value for wp_obj.
*/
para_obj:=OLE2.Invoke_Obj(wp_obj, 'get_para', my_Arglist);


OLE2.IsSupported

  Examples	   Related Topics 	   All Built-ins

Description  Confirms that the OLE2 package is supported on the current platform.

Syntax

OLE2.ISSUPPORTED

Returns  TRUE, if OLE2 is supported on the platform; FALSE if it is not.


OLE2.IsSupported example

  Related Topics	   All Examples

/*
** Before calling an OLE2 object in platform independent code,
** use this predicate to determine if OLE2 is supported on the
** current platform.
*/
IF (OLE2.ISSUPPORTED)THEN
. . . PL/SQL code using the OLE2 package
ELSE
. . . message that OLE2 is not supported
END IF;


OLE2.Last_Exception

  Examples	   Related Topics 	   All Built-ins

Description  Returns the last OLE2 exception signaled by a PL/SQL exception.

Syntax

FUNCTION last_exception return NUMBER;

or

FUNCTION last_exception(message OUT VARCHAR2) return NUMBER;

Parameters

message	A text string (VARCHAR2) containing the text of the OLE2 error message.  If included, this variable is returned to the caller of the function, in addition to the error code value.

Returns  The complete OLE2 error code from the last OLE2 exception.

Usage Notes

•	You can use either syntax for this function.  The first syntax returns only the error code; the second syntax returns a text description of the error, in addition to the error code.

•	This function returns a complete OLE2 (Windows) style error code as a NUMBER.  To extract just the error code portion, you must remove the highest bit (Severity) and then translate the remaining number to INTEGER or BINARY_INTEGER format.  See OLE2.Last_Excecption example for an example of a procedure that extracts the error code as an integer.


OLE2.Last_Exception example

  Related Topics	   All Examples

PACKAGE olepack IS
  PROCEDURE init(...);
  PROCEDURE something(...);
  PROCEDURE shutdown(...);
  FUNCTION get_err(message OUT VARCHAR2) RETURN BINARY_INTEGER;
END olepack;

PACKAGE BODY olepack IS
...
  FUNCTION get_err(message OUT VARCHAR2) RETURN BINARY_INTEGER IS
  --
  -- OLE errors are formatted as 32 bit unsigned integers and
  -- returned as Oracle NUMBERS. We want to extract only the
  -- error code, which is contained in the lowest 16 bits.
  -- We must first strip off the top [severity] bit, if it
  -- exists. Then, we must translate the error to an
  -- INTEGER or BINARY INTEGER and extract the error code.
  --
  -- Some helpful constants:
  --  0x80000000 = 2147483648
  -- 0x100000000 = 4294967296
  --  0x0000FFFF =      65535
  --
     hibit     NUMBER := 2147483648;
     four_gig  NUMBER := 4294967296;
     code_mask NUMBER := 65535;
     excep     NUMBER;
     trunc_bi  BINARY_INTEGER;
     ole_code  BINARY_INTEGER;
  BEGIN
     excep := OLE2.LAST_EXCEPTION(message);
     IF (excep >= hibit) AND (excep <= four_gig) THEN
         trunc_bi := excep - hibit;
     END IF;
     -- Mask out just the Code section
     ole_code := BITAND(trunc_bi, code_mask);
     RETURN ole_code;
  END get_err;
END olepack;

PROCEDURE ole_test IS
  err_code BINARY_INTEGER;
  err_text VARCHAR2(255);
BEGIN
  olepack.init(...);
  olepack.something(...);
  olepack.shutdown(...);
EXCEPTION
  WHEN OLE2.OLE_ERROR THEN
    err_code := olepack.get_err(err_text);
    TEXT_IO.PUT_LINE('OLE Error #' || err_code || ': ' || err_text);
    olepack.shutdown(...);
END ole_test;


OLE2.List_Type

  Examples	   Related Topics 	   All Built-ins

Description  Specifies a handle to an argument List.

Syntax

List   OLE2.LIST_TYPE;


OLE2.List_Type example

  Related Topics	   All Examples

...
  alist   OLE2.LIST_TYPE;
...
    alist := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(alist, <argument1>);
    OLE2.ADD_ARG(alist, <argument2>);
    ...

    wkbook := OLE2.INVOKE_OBJ(my_obj, 'method1', alist);
    ...


OLE2.Obj_Type

  Examples	   Related Topics 	   All Built-ins

Description  Specifies a handle to an OLE2 Automation Object.

Syntax

obj OLE2.OBJECT_TYPE;

Usage Notes

•	OLE2.Obj_Type is the OLE2 package’s equivalent of an unknown object.

•	For more information, see FORMS_OLE.GET_INTERFACE_POINTER in the Forms documentation.


OLE2.Obj_Type example

  Related Topics	   All Examples

 /*
 ** Create an OLE2 Object
 */

  obj OLE2.OBJECT_TYPE;
  ...
  obj := OLE2.Create_Obj('Excel.Application.5');
  ...


OLE2.OLE_Error

  Examples	   Related Topics 	   All Built-ins

Description  This exception is raised on an error in the OLE2 package.

Syntax

OLE2.OLE_ERROR EXCEPTION;


OLE2.OLE_Error example

  Related Topics	   All Examples

PROCEDURE ole_test IS
  err_code BINARY_INTEGER;
  err_text VARCHAR2(255);
BEGIN
  olepack.init(...);
  olepack.something(...);
  olepack.shutdown(...);
EXCEPTION
  WHEN OLE2.OLE_ERROR THEN
    err_code := olepack.get_err(err_text);
    TEXT_IO.PUT_LINE('OLE Error #' || err_code || ': ' || err_text);
    olepack.shutdown(...);
END ole_test;


OLE2.OLE_Not_Supported

  Examples	   Related Topics 	   All Built-ins

Description  This exception is raised if a call is made to the OLE2 package but OLE2 is not supported on the current software platform.

Syntax

OLE2.OLE_NOT_SUPPORTED EXCEPTION;


OLE2.OLE_Not_Supported example

  Related Topics	   All Examples

PROCEDURE ole_test IS
  err_code BINARY_INTEGER;
  err_text VARCHAR2(255);
BEGIN
  olepack.init(...);
  olepack.something(...);
  olepack.shutdown(...);
EXCEPTION
  WHEN OLE2.OLE_NOT_SUPPORTED THEN
    TEXT_IO.PUT_LINE('OLE2 is not supported on this computer');
    olepack.shutdown(...);
END ole_test;


OLE2.Release_Obj

  Examples	   Related Topics 	   All Built-ins

Description  Signals an OLE2 Automation Object that the PL/SQL client no longer needs it.

Syntax

PROCEDURE OLE2.Release_Obj
   (object   obj_type);

Parameters

object	An OLE2 Automation Object.
Usage Notes  This allows the operating system to deallocate any resources related to the object.  You must release each OLE2 Automation Object you create or invoke using the OLE2 Package.


OLE2.Release_Obj example

  Related Topics	   All Examples

 /*
**Release the OLE2 object objap.
*/
declare
  objap   OLE2.Obj_Type;
begin
  objap:=OLE2.Create_Obj('Excel.application.5');
  OLE2.Release_Obj(objap);
end;


OLE2.Set_Property

  Examples	   Related Topics 	   All Built-ins

Description  Sets the value of a property of an OLE2 Automation Object.

Syntax

PROCEDURE OLE2.Set_Property
   (object   obj_type,
    property VARCHAR2,
    value    NUMBER,
    Arglist  List_Type := 0);

PROCEDURE OLE2.Set_Property
   (object   obj_type,
    property VARCHAR2,
    value    VARCHAR2,
    Arglist  List_Type := 0);

Parameters

object	An OLE2 Automation Object.
property	The name of a property in an OLE2 Automation Object.
value	A property value.
Arglist	The name of an argument List assigned to the OLE2.Create_Arglist Function.


OLE2.Set_Property example

  Related Topics	   All Examples

/*
**Set properties for the OLE2 object `Excel.Application'.
*/
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.Set_Property(application,'Visible', 'True');

workbooks:=OLE2.INVOKE_OBJ(application, 'Workbooks');
workbook:=OLE2.INVOKE_OBJ(workbooks,'Add');
worksheets:=OLE2.INVOKE_OBJ(workbook, 'Worksheets');
worksheet:=OLE2.INVOKE_OBJ(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 4);
OLE2.ADD_ARG(args, 2);
cell:=OLE2.Invoke_Obj(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.Set_Property(cell, 'Value', 'Hello Excel!');


ORA_PROF package

  Related Topics 	  All Built-ins

Ora_Prof.Bad_Timer

Ora_Prof.Create_Timer

Ora_Prof.Destroy_Timer

Ora_Prof.Elapsed_Time

Ora_Prof.Reset_Timer

Ora_Prof.Start_Timer

Ora_Prof.Stop_Timer


Ora_Prof.Bad_Timer

  Examples	   Related Topics 	   All Built-ins

Description  Raised when an invalid timer name is supplied to another ORA_PROF package procedure or function.

Syntax

Ora_Prof.Bad_Timer  EXCEPTION;


Ora_Prof.Bad_Timer example

  Related Topics	   All Examples

  /*
** Create a timer, start it, run a subprogram,
** stop the timer, then display the time in
** seconds.  Destroy the timer when finished.
*/
PROCEDURE timed_proc (test VARCHAR2) IS
  i PLS_INTEGER;
BEGIN
  Ora_Prof.Create_Timer('loop2');
  Ora_Prof.Start_Timer('loop2');
  test;
  Ora_Prof.Stop_Timer('loop2');
  Text_IO.Putf('Loop executed in %s seconds.\n',
                Ora_Prof.Elapsed_Time('loop2'));
  Ora_Prof.Destroy_Timer('loop2');
EXCEPTION
  WHEN ORA_PROF.BAD_TIMER THEN
  text_io.put_line('Invalid timer name');

END;


Ora_Prof.Create_Timer

  Examples	   Related Topics 	   All Built-ins

Description  Allocates the named timer.  Any references to the named timer before this service is used will raise an error.

Syntax

PROCEDURE Ora_Prof.Create_Timer
   (timer VARCHAR2);

Parameters

timer	The name of the timer.


Ora_Prof.Create_Timer example

  Related Topics	   All Examples

 /*
**Allocate the timer ‘LOOPTIME’.
*/
Ora_Prof.Create_Timer('LOOPTIME');


Ora_Prof.Destroy_Timer

  Examples	   Related Topics 	   All Built-ins

Description  Destroys the named timer.  All memory associated with the timer is freed at that time.  Any references to the named timer after this service is used will raise an error.

Syntax

PROCEDURE Ora_Prof.Destroy_Timer
   (timer VARCHAR2);

Parameters

timer	The name of the timer.


Ora_Prof.Destroy_Timer example

  Related Topics	   All Examples

 /*
**Destroy the timer ‘LOOPTIME’.
*/
Ora_Prof.Destroy_Timer('LOOPTIME');


Ora_Prof.Elapsed_Time

  Examples	   Related Topics 	   All Built-ins

Description  Returns the amount of time accumulated in the code timer since the last call to Ora_Prof.Reset_Timer.

Syntax

FUNCTION Ora_Prof.Elapsed_Time
   (timer PLS_INTEGER)
RETURN PLS_INTEGER;

Parameters

timer	The name of the timer.
Returns  The amount of time (in milliseconds) accumulated in the code timer.


Ora_Prof.Elapsed_Timer example

  Related Topics	   All Examples

 /*
** Create a timer, start it, run a subprogram,
** stop the timer, then display the time in
** seconds.  Destroy the timer when finished.
*/
PROCEDURE timed_proc (test VARCHAR2) IS
  i PLS_INTEGER;
BEGIN
  Ora_Prof.Create_Timer('loop2');
  Ora_Prof.Start_Timer('loop2');
  test;
  Ora_Prof.Stop_Timer('loop2');
  Text_IO.Putf('Loop executed in %s seconds.\n',
     Ora_Prof.Elapsed_Time('loop2'));
  Ora_Prof.Destroy_Timer('loop2');
END;


Ora_Prof.Reset_Timer

  Examples	   Related Topics 	   All Built-ins

Description  Resets the elapsed time of a timer to zero.

Syntax

PROCEDURE Ora_Prof.Reset_Timer
   (timer VARCHAR2);

Parameters

timer	The name of the timer.


Ora_Prof.Reset_Timer example

  Related Topics	   All Examples

 PROCEDURE multi_time IS
  i PLS_INTEGER;
 BEGIN
   Ora_Prof.Create_Timer('loop');
   --
   -- First loop...
   --
   Ora_Prof.Start_Timer('loop');
   FOR i IN 1..10 LOOP
     Text_IO.Put_Line('Hello');
   END LOOP;
   Ora_Prof.Stop_Timer('loop');
   --
   -- Second loop...
   --
   Ora_Prof.Start_Timer('loop');
   FOR i IN 1..10 LOOP
     Text_IO.Put_Line('Hello');
   END LOOP;
   Ora_Prof.Stop_Timer('loop');
   Ora_Prof.Destroy_Timer('loop');
 END;


Ora_Prof.Start_Timer

  Examples	   Related Topics 	   All Built-ins

Description  Starts a timer.  Any time accumulated between calls to Ora_Prof.Timer_Start and Ora_Prof.Timer_Stop added to the timer's total elapsed time.

Syntax

PROCEDURE Ora_Prof.Start_Timer
   (timer VARCHAR2);

Parameters

timer	The name of the timer.


Ora_Prof.Start_Timer example

  Related Topics	   All Examples

 PROCEDURE multi_time IS
  i PLS_INTEGER;
BEGIN
  Ora_Prof.Create_Timer('loop');
  --
  -- First loop...
  --
  Ora_Prof.Start_Timer('loop');
    FOR i IN 1..10 LOOP
      Text_IO.Put_Line('Hello');
    END LOOP;
  Ora_Prof.Stop_Timer('loop');
   --
   -- Second loop...
   --
  Ora_Prof.Start_Timer('loop');
  FOR i IN 1..10 LOOP
    Text_IO.Put_Line('Hello');
  END LOOP;
  Ora_Prof.Stop_Timer('loop');
  Ora_Prof.Destroy_Timer('loop');
END;


Ora_Prof.Stop_Timer

  Examples	   Related Topics 	   All Built-ins

Description  Stops a timer.  Any time accumulated between calls to Ora_Prof.Timer_Start and Ora_Prof.Timer_Stop added to the timer's total elapsed time.

Syntax

PROCEDURE Ora_Prof.Stop_Timer
   (timer VARCHAR2);

Parameters

timer	The name of the timer.


Ora_Prof.Stop_Timer example

  Related Topics	   All Examples

 PROCEDURE multi_time IS
  i PLS_INTEGER;
BEGIN
  Ora_Prof.Create_Timer('loop');
   --
   -- First loop...
   --
  Ora_Prof.Start_Timer('loop');
    FOR i IN 1..10 LOOP
      Text_IO.Put_Line('Hello');
    END LOOP;
  Ora_Prof.Stop_Timer('loop');
   --
   -- Second loop...
   --
  Ora_Prof.Start_Timer('loop');
  FOR i IN 1..10 LOOP
    Text_IO.Put_Line('Hello');
  END LOOP;
  Ora_Prof.Stop_Timer('loop');
  Ora_Prof.Destroy_Timer('loop');
END;


TOOL_RES package

  Related Topics 	  All Built-ins

Tool_Res.Bad_File_Handle

Tool_Res.Buffer_Overflow

Tool_Res.File_Not_Found

Tool_Res.No_Resource

Tool_Res.Rfclose

Tool_Res.Rfhandle

Tool_Res.Rfopen

Tool_Res.Rfread


Tool_Res.Bad_File_Handle

  Examples 	   Related Topics 	   All Built-ins

Description  Raised when the file handle passed to Tool_Res.Rfclose is invalid.

Syntax

Tool_Res.Bad_File_Handle  EXCEPTION;


Tool_Res.Bad_File_Handle example

  Related Topics	   All Examples

/*
** This examples uses Tool_Res.Bad_File_Handle
*/
PRODEDURE res_test IS
  resfileh   TOOL_RES.RFHANDLE;
  resfileh1  TOOL_RES.RFHANDLE;
  res1       VARCHAR2(20);
BEGIN
  /*  Open a resource file */
  resfileh := TOOL_RES.RFOPEN('C:\resource\test.res');
  ...
  /* Used wrong handle to close
       the resource file. */
  TOOL_RES.RFCLOSE(resfileh1);
  ...
EXCEPTION
  WHEN TOOL_RES.BAD_FILE_HANDLE THEN
    /* print error message */
    TEXT_IO.PUT_LINE('Invalid file handle.');
    /* discard the error */
    TOOL_ERR.POP;
END;


Tool_Res.Buffer_Overflow

  Examples 	   Related Topics 	   All Built-ins

Description  Raised when you tried to get a resource that was longer than the supplied buffer.

Syntax

Tool_Res.Buffer_Overflow  EXCEPTION;


Tool_Res.Buffer_Overflow example

  Related Topics	   All Examples

/*
** This example uses Tool_Res.Buffer_Overflow
*/
PRODEDURE res_buf_test IS
  resfileh   TOOL_RES.RFHANDLE;
  res1       VARCHAR2(20);
BEGIN
  /*  Open a resource file */
  resfileh := TOOL_RES.RFOPEN
           ('C:\resource\test.res');
  /*  Attempt to read very large string
          which overflows buffer. */
  res1 := TOOL_RES.RFREAD(resfileh,'res_1');
   ...

EXCEPTION
  WHEN TOOL_RES.BUFFER_OVERFLOW THEN
    /* print error message */
    TEXT_IO.PUT_LINE('Buffer overflow.');
    /* discard the error */
    TOOL_ERR.POP;
END;


Tool_Res.File_Not_Found

  Examples 	   Related Topics 	   All Built-ins

Description  Raised when the specified file cannot be opened, most likely because of one of the following reasons:

•	file name

•	permissions on the file

•	system error

Syntax

Tool_Res.File_Not_Found  EXCEPTION;


Tool_Res.File_Not_Found example

  Related Topics	   All Examples

/*
** This example uses Tool_Res.File_Not_Found
*/
PRODEDURE res_test IS
  resfileh   TOOL_RES.RFHANDLE;
  res1       VARCHAR2(20);
BEGIN
  /* Open a resource file */
  resfileh := TOOL_RES.RFOPEN
        ('C:\resource\twst.res');
  /* File name is misspelled. */
  ...

EXCEPTION
  WHEN TOOL_RES.FILE_NOT_FOUND THEN
    /* print error message */
    TEXT_IO.PUT_LINE('Cannot find the file.');
    /* discard the error */
    TOOL_ERR.POP;
END;


Tool_Res.No_Resource

  Examples 	   Related Topics 	   All Built-ins

Description  This exception is raised when the named resource could not be found.  If a file was specified, the resource does not exist in that file.  If no file was specified, the resource does not exist in any of the resource files that are currently open.

Syntax

Tool_Res.No_Resource  EXCEPTION;


Tool_Res.No_Resource example

  Related Topics	   All Examples

/*
** This examples uses Tool_Res.No_Resource
*/
PRODEDURE res_test IS
  resfileh   TOOL_RES.RFHANDLE;
  res1       VARCHAR2(20);
BEGIN
  /* Open a resource file */
  resfileh := TOOL_RES.RFOPEN
         ('C:\resource\test.res');
  /* Attempt to read nonexistant
     resource from file. */
  res1 := TOOL_RES.RFREAD(resfileh,'Res_1');
   ...

EXCEPTION
  WHEN TOOL_RES.NO_RESOURCE THEN
    /* print error message */
    TEXT_IO.PUT_LINE('Cannot find the resource.');
    /* discard the error */
    TOOL_ERR.POP;
END;


Tool_Res.Rfclose

  Examples	   Related Topics 	   All Built-ins

Description  Closes the specified resource file.  All files opened with Tool_Res.Rfopen should be closed using Tool_Res.Rfclose before quitting the application.

Syntax

PROCEDURE Tool_Res.Rfclose
   (file rfhandle);

Parameters

file	A file to close.
Usage Notes  The following exceptions may be raised by RFCLOSE:

BAD_FILE_HANDLE	Raised if the file handle does not point to a valid file.
Tool_Err.Tool_Error	Raised if an internal error is trapped.


Tool_Res.Rfclose example

  Related Topics	   All Examples

/*
** This examples uses Tool_Res.Rfclose
*/
PROCEDURE my_cleanup
     (my_file_handle IN OUT TOOL_RES.RFHANDLE)IS
BEGIN
  /* Assign a resource file to 'fhandle.' */
  ...

  /* Close the resource file with the
              handle ‘fhandle.’ */
  TOOL_RES.RFCLOSE(my_file_handle);
  ...
END;


Tool_Res.Rfhandle

  Examples	   Related Topics 	   All Built-ins

Description  Specifies a handle to a file.

Syntax

TYPE Tool_Res.Rfhandle;


Tool_Res.Rfhandle example

  Related Topics	   All Examples

/*
** This examples uses Tool_Res.Rfhandle
*/
PRODEDURE res_test IS
  /* Specify the handle ‘resfileh'. */
  resfileh   TOOL_RES.RFHANDLE;
BEGIN
  /* Assign handle to a resource file */
  resfileh := TOOL_RES.RFOPEN('C:\test.res');
  ...
END;


Tool_Res.Rfopen

  Examples	   Related Topics 	   All Built-ins

Description  Opens the specified file as a resource file.

Syntax

FUNCTION Tool_Res.Rfopen
   (spec VARCHAR2)
RETURN rfhandle;

Parameters

spec	A file to be opened.  spec is not case-sensitive.
Returns  A handle to the specified file.

Usage Notes  The following exceptions may be raised by Tool_Res.Rfopen:

File_Not_Found	Raised if spec does not point to a valid file, or the file cannot be opened.
Tool_Err.Tool_Error	Raised if an internal error is trapped.


Tool_Res.Rfopen example

  Related Topics	   All Examples

/*
** This example uses Tool_Res.Rfopen
*/
PROCEDURE my_init
  (fhandle OUT TOOL_RES.RFHANDLE) IS
BEGIN
  /* Open a resource file and assign it to
            the handle, 'fhandle.' */
  fhandle := TOOL_RES.RFOPEN('C;\my_app.res');
   ...
END;


Tool_Res.Rfread

  Examples	   Related Topics 	   All Built-ins

Description  Reads the specified resource.  If a file handle is included, only the specified resource file will be searched for the named resource.  Otherwise, all currently open resource files will be searched.

Syntax

FUNCTION Tool_Res.Rfread
   (rfile   rfhandle,
    resid   VARCHAR2,
    restype VARCHAR2 := 'string')
RETURN VARCHAR2;

FUNCTION Tool_Res.Rfread
   (resid   VARCHAR2,
    restype VARCHAR2 := 'string')
RETURN VARCHAR2;

Parameters

rfile	A file to read.
resid	A resource ID.
restype	The type of resource.
Returns  A handle to the specified file.

Usage Notes  The following exceptions may be raised by Rfread:

No_Resource	Raised if the named resource could not be located.
Buffer_Overflow	Raised if the supplied "buffer" is smaller than the requested resource.
Tool_Err.Tool_Error	Raised if an internal error is trapped.


Tool_Res.Rfread example

  Related Topics	   All Examples

/*
** This examples uses Tool_Res.Rfread
*/
PRODEDURE ban_res IS
  resfileh   TOOL_RES.RFHANDLE;
  res1       VARCHAR2(20);
BEGIN
  /*  Open a resource file */
  resfileh := TOOL_RES.RFOPEN
         ('C:\resource\test.res');
  /*  Read resource string 'banner' from file */
  res1 := TOOL_RES.RFREAD(resfileh,'banner');
  ...

  TEXT_IO.PUT_LINE(res1);
  ...

END;


TEXT_IO package

  Related Topics 	  All Built-ins

Text_IO.Fclose

Text_IO.File_Type

Text_IO.Fopen

Text_IO.Is_Open

Text_IO.Get_Line

Text_IO.New_Line

Text_IO.Put

Text_IO.Putf

Text_IO.Put_Line


Text_IO.Fclose

  Examples	   Related Topics 	   All Built-ins

Description  Closes an open file.

Syntax

PROCEDURE Text_IO.Fclose
   (file file_type);

Parameters

file	A variable that specifies the file to close.


Text_IO.Fclose example

  Related Topics	   All Examples

 /*
**  Close the output file.
*/
Text_IO.Fclose (out_file);


Text_IO.File_Type

  Examples	   Related Topics 	   All Built-ins

Description  Specifies a handle to a file.

Syntax

TYPE Text_IO.File_Type;


Text_IO.File_Type example

  Related Topics	   All Examples

 /*
** Declare a local variable to represent
** the output file you will write to.
*/
out_file  Text_IO.File_Type;


Text_IO.Fopen

  Examples	   Related Topics 	   All Built-ins

Description  Opens the designated file in the specified mode.

Syntax

FUNCTION Text_IO.Fopen
   (spec     VARCHAR2,
    filemode VARCHAR2)
RETURN Text_IO.File_Type;

Parameters

spec	A case-insensitive string corresponding to a file's name.
filemode	A single case-insensitive character that specifies the mode in which to open the file, and consists of one of the following characters: R     Open the file for reading only. W     Open the file for reading and writing after deleting all existing lines in the file. A     Open the file for reading and writing without deleting existing lines (i.e., appending).
Returns  A handle to the specified file.


Text_IO.Fopen example

  Related Topics	   All Examples

 /*
** Declare two local variables to represent two files:
** one to read from, the other to write to.
*/
in_file   Text_IO.File_Type;
out_file  Text_IO.File_Type;
in_file  := Text_IO.Fopen('salary.txt', 'r');
out_file := Text_IO.Fopen('bonus.txt', 'w');


Text_IO.Is_Open

  Examples	   Related Topics 	   All Built-ins

Description  Checks to see if the specified file is currently open.

Syntax

FUNCTION Text_IO.Is_Open
   (file file_type)
RETURN BOOLEAN;

Parameters

file	A variable that specifies the file to check.
Returns  TRUE or FALSE.


Text_IO.Is_Open example

  Related Topics	   All Examples

 /*
** Determine if the output file is open.  If so,
** then close it.
*/
IF Text_IO.Is_Open(out_file) THEN
   Text_IO.Fclose(out_file);


Text_IO.Get_Line

  Examples	   Related Topics 	   All Built-ins

Description  Retrieves the next line of an open fileand places it in item.  Text_IO.Get_Line reads characters until a newline character (i.e., carriage return) is read or an end-of-file (EOF) condition is encountered.

If the line to be read exceeds the size of item, the Value_Error exception is raised.  If there are no more characters remaining in the file, the No_Data_Found exception is raised.

Syntax

PROCEDURE Text_IO.Get_Line
  (file file_type,
   item OUT VARCHAR2);

Parameters

file	A variable that specifies an open file.
item	A variable used to hold the next line read


Text_IO.Get_Line example

  Related Topics	   All Examples

/*
** Open a file and read the first line
** into linebuf.
*/
declare
  in_file  Text_IO.File_Type;
  linebuf  VARCHAR2(80);
begin
  in_file := Text_IO.Fopen('salary.txt', 'r');
  Text_IO.Get_Line(in_file,linebuf);
end;


Text_IO.New_Line

  Examples	   Related Topics 	   All Built-ins

Description  Concatenates the specified number of newline characters (i.e., carriage returns) to the current line of an open file, or outputs them to the Interpreter.  The default is 1, that is, if you specify no number (e.g., Text_IO.New_Line;) a single newline character is created.

Syntax

PROCEDURE Text_IO.New_Line
   (file file_type,
    n    PLS_INTEGER := 1);

PROCEDURE Text_IO.New_Line
    (n PLS_INTEGER := 1);

Parameters

file	A variable that specifies an open file.
n	An integer.


Text_IO.New_Line example

  Related Topics	   All Examples

 /*
** Write a string to the output file, then
** create a newline after it.
*/
Text_IO.Put(out_file, SYSDATE);
Text_IO.New_Line(out_file, 2);


Text_IO.Put

  Examples	   Related Topics 	   All Built-ins

Description  Concatenates the supplied data to the current line of an open file, or outputs it to the Interpreter.  Notice that there are several Text_IO.Put procedures, which accept VARCHAR2, DATE, NUMBER, and PLS_INTEGER values for item.  All of the procedures (except VARCHAR2) convert the supplied data to a character string.  No newline character (i.e., carriage return) Added.

Syntax

PROCEDURE Text_IO.Put
   (file file_type,
    item VARCHAR2);

PROCEDURE Text_IO.Put
   (item VARCHAR2);

PROCEDURE Text_IO.Put
   (item DATE);

PROCEDURE Text_IO.Put
   (file file_type,
    item DATE);

PROCEDURE Text_IO.Put
   (file file_type,
    item NUMBER);

PROCEDURE Text_IO.Put
   (item NUMBER);

PROCEDURE Text_IO.Put
   (file file_type,
    item PLS_INTEGER);

PROCEDURE Text_IO.Put
   (item PLS_INTEGER);

Parameters

file	A variable that specifies an open file.
item	A variable to be used as a buffer.


Text_IO.Put example

  Related Topics	   All Examples

 /*
** Write a line to a specified output file, create
** a newline, then write another line to the output
** file.
*/
Text_IO.Put(out_file, SYSDATE);
Text_IO.New_Line(out_file);
Text_IO.Put('Processing ends...');


Text_IO.Putf

  Examples	   Related Topics 	   All Built-ins

Description  Formats and writes a message to an open file, or outputs the message to the Interpreter.  You can embed up to five "%s" patterns within format (e.g., '%s %s %s').  The "%s" patterns are replaced with successive character arg values (e.g., `Check', `each', `value.').  "\n" patterns are replaced with newline characters (i.e., carriage returns).

Syntax

PROCEDURE Text_IO.Putf
   (arg    VARCHAR2);

PROCEDURE Text_IO.Putf
   (file   file_type,
    arg    VARCHAR2);

PROCEDURE Text_IO.Putf
   (file   file_type,
    format VARCHAR2,
   [arg1 [,..., arg5] VARCHAR2]);

PROCEDURE Text_IO.Putf
   (format VARCHAR2,
   [arg1 [,..., arg5] VARCHAR2]);

Parameters

arg	An argument that specifies the value to be displayed (e.g., character string, variable).
format	Specifies the format of the message to be displayed.
file	A variable that specifies an open file.
Usage Notes  To format messages containing non-character substitutions, use the TO_CHAR function on the argument (see the example below).


Text_IO.Putf example

  Related Topics	   All Examples

 /*
** Write a line to the output file, using the
** TO_CHAR(SYSDATE) call to represent the substituted
** character variable.
*/
Text_IO.Putf(out_file,'Today is %s\n',
  TO_CHAR(SYSDATE));


Text_IO.Put_Line

  Examples	   Related Topics 	   All Built-ins

Description  Concatenates the character data supplied by item to the current line of an open file, or outputs it to the Interpreter.  A newline character (i.e., carriage return) is automatically Added To the end of the string.

Syntax

PROCEDURE Text_IO.Put_Line
   (file file_type,
    item VARCHAR2);

Parameters

file	A variable that specifies an open file.
item	A variable that specifies the character data to be displayed.


Text_IO.Put_Line example

  Related Topics	   All Examples

 /*
** Print two complete lines to the output file.
*/
Text_IO.Put_Line(out_file, TO_CHAR(SYSDATE));
Text_IO.Put_Line('Starting test procedures...');


About Developer built-in packages

  Related Topics 	  All Built-ins

Forms Developer and Reports Developer provide several client-side built-in packages that contain many PL/SQL constructs you can reference while building applications or debugging your application code.  These built-in packages are not installed as extensions to the package STANDARD.  As a result, any time you reference a construct in one of the packages, you must prefix it with the package name, e.g., TEXT_IO.Put_Line.

The built-in packages are:

DDE	provides Dynamic Data Exchange support within Developer components.
DEBUG	provides procedures, functions, and exceptions for debugging PL/SQL program units.
EXEC_SQL	provides procedures and functions for executing dynamic SQL within PL/SQL code written for Developer applications.
LIST	provides procedures, functions, and exceptions you can use to create and maintain lists of character strings (VARCHAR2).  This provides a means of creating arrays in PL/SQL Version 1.
OLE2	provides a PL/SQL API for creating, manipulating, and accessing attributes of OLE2 automation objects.
ORA_FFI	provides a public interface for calling out to foreign(C) functions from PL/SQL.
ORA_NLS	enables you to extract high-level information about your current language environment.
ORA_PROF	provides procedures, functions, and exceptions you can use for tuning your PL/SQL program units (e.g. examining how much time a specific piece of code takes to run).
TEXT_IO	provides constructs that allow you to read and write information from and to files.
TOOL_ENV	allows you to interact with Oracle environment variables.
TOOL_ERR	allows you to access and manipulate the error stack created by other built-in packages such as DEBUG.
TOOL_RES	provides a means of extracting string resources from a resource file with the goal of making PL/SQL code more portable by isolating all textual data in the resource file.

The following packages are used only internally by Forms Developer and Reports Developer.  There are no subprograms available for external use with these packages.

ORA_DE	Contains constructs used by Developer for private PL/SQL services.
STPROC	Used internally by Developer to call subprograms stored in the database.  Calls to this package are automatically generated.


About the DDE package

  Related Topics 	  All Built-ins

The DDE Package provides Dynamic Data Exchange (DDE) support within Developer components.

Dynamic Data Exchange (DDE) is a mechanism by which applications can communicate and exchange data in Windows.  DDE client support is added as a procedural extension to Developer.  The PL/SQL package for DDE support provides application developers with an Application Programming Interface (API) for accessing DDE functionality from within PL/SQL procedures and triggers.

The DDE functions enable Oracle applications to communicate with other DDE-compliant Windows applications (servers) in three ways:

•	importing data

•	exporting data

•	executing commands against the DDE Server

In this release, DDE does not include the following:

•	data linking (advise transaction)

Oracle applications cannot automatically receive an update notice when a data item has changed.

•	Server support

Oracle applications cannot respond to commands or requests for data from a DDE client.  Oracle Applications must initiate the DDE conversation (although data may still be transferred in either direction).

Support Functions	These functions are used to start and stop other DDE server applications.

Connect/Disconnect Functions	These functions are used to connect to and disconnect from DDE server applications.

Transaction Functions	These functions are used to exchange data with DDE server applications.

Datatype Translation Functions	These functions are used to translate DDE datatype constants to strings and back; in addition, DDE.Getformatnum allows users to register a new data format that is not predefined by Windows.  Note that these functions do not translate the data itself (all DDE data is represented with the CHAR datatype in PL/SQL), just datatype constants.

Note:  In previous releases of Developer, it was necessary to attach a stub library so that calls to the Windows-specific DDE functions would compile and run correctly on non-Windows platforms. This is no longer necessary. However, when you attempt to execute a Windows-specific built-in function on a non-Windows platform, the following messages are generated:

FRM-40735: Trigger <name> raised unhandled exception.
ORA-06509, 00000 PL/SQL: ICD vector missing for this package.


Microsoft Windows predefined data formats

  Related Topics

See the Exceptions section for predefined data format exceptions.

DDE.Cf_Bitmap	The data is a bitmap.
DDE.Cf_Dib	The data is a memory object containing a BITMAPINFO structure followed by the bitmap data.
DDE.Cf_Dif	The data is in Data Interchange Format (DIF).
DDE.Cf_Dspbitmap	The data is a bitmap representation of a private format.  This data is displayed in bitmap format in lieu of the privately formatted data.
DDE.Cf_Dspmetafile-Pict	The data is a metafile representation of a private data format.  This data is displayed in metafile-picture format in lieu of the privately formatted data.
DDE.CF_Dsptext	The data is a Textual Representation of a private data format.  This data is displayed in Text Format in lieu of the privately formatted data.
DDE.Cf_Metafilepict	The data is a metafile.
DDE.Cf_Oemtext	The data is an array of Text Characters in the OEM character set.  Each line ends with a carriage return-linefeed (CR-LF) combination.  A null character signals the end of the data.
DDE.Cf_Owner-Display	The data is in a private format that the clipboard owner must display.
DDE.Cf_Palette	The data is a color palette.
DDE.Cf_Pendata	The data is for the pen extensions to the Windows operating system.
DDE.Cf_Riff	The data is in Resource Interchange File Format (RIFF).
DDE.Cf_Sylk	The data is in Microsoft Symbolic Link (SYLK) format.
DDE.Cf_Text	The data is an array of Text Characters.  Each line ends with a carriage return-linefeed (CR-LF) combination.  A null character signals the end of the data.
DDE.Cf_Tiff	The data is in Tagged Image File Format (TIFF).
DDE.Cf_Wave	The data describes a sound wave.  This is a subset of the CF_RIFF data format; it can be used only for RIFF WAVE files.


DDE predefined exceptions

  Related Topics

DDE.DDE_App_Failure	An application program specified in a DDE.App_Begin call could not be started.
DDE.DDE_App_Not_ Found	An application ID specified in a DDE.App_End or DDE.App_Focus call does not correspond to an application that is currently running.
DDE.DDE_Fmt_Not_ Found	A format number specified in a DDE.Getformatstr call is not known.
DDE.DDE_Fmt_Not_Reg	A format string specified in a DDE.Getformatnum call does not correspond to a predefined format and could not be registered as a user-defined format.
DDE.DDE_Init_Failed	The application was unable to initialize DDE communications, which caused a call to the DDE Layer to fail.
DDE.DDE_Param_Err	An invalid parameter, such as a NULL value, was passed to a DDE Package routine.
DDE.Dmlerr_Busy	A transaction failed because the server application was busy.
DDE.Dmlerr_Dataacktimeout	A request for a synchronous data transaction has timed out.
DDE.Dmlerr_ExecackTimeout	A request for a synchronous execute transaction has timed out.
DDE.Dmlerr_Invalidparameter	A parameter failed to be validated.  Some of the possible causes are as follows:
	The application used a data handle initialized with a different item-name handle or clipboard data format than that required by the transaction.
	The application used an invalid conversation identifier.
	More than one instance of the application used the same object.
DDE.Dmlerr_Memory_Error	A memory allocation failed.
DDE.Dmlerr_No_Conv_Established	A client's attempt to establish a conversation has failed.  The service or topic name in a DDE.Initiate call may be in error.
DDE.Dmlerr_Notprocessed	A transaction failed.  The item name in a DDE.Poke or DDE.Request transaction may be in error.
DDE.Dmlerr_Not_Supported	A call is made to the DDE package but DDE is not supported on the current software platform.
DDE.Dmlerr_Pokeacktimeout	A request for a synchronous DDE.Poke transaction has timed out.
DDE.Dmlerr_Postmsg_Failed	An internal call to the PostMessage function has failed.
DDE.Dmlerr_Server_ Died	The server terminated before completing a transaction.
DDE.Dmlerr_Sys_Error	An internal error has occurred in the DDE Layer.


About the DEBUG package

  Related Topics 	  All Built-ins

The DEBUG package contains procedures, functions, and exceptions for use when debugging your PL/SQL program units.  Use these built-in subprograms to create debug triggers and set breakpoints with triggers.


About the LIST package

  Related Topics 	  All Built-ins

The LIST package contains procedures, functions, and exceptions you can use to create and maintain lists of character strings (VARCHAR2).  These services provide a means of creating arrays in PL/SQL Version 1.


About the OLE2 package

  Related Topics 	  All Built-ins

The OLE2 package provides a PL/SQL API for creating, manipulating, and accessing attributes of OLE2 automation objects.

OLE2 automation objects encapsulate a set of attributes and methods that can be manipulated or invoked from an OLE2 automation client.  The OLE2 package allows users to access OLE2 automation servers directly from PL/SQL.

Refer to the OLE2 programmers documentation for each OLE2 automation server for the object types, methods, and syntax specification.


About the ORA_FFI package

  Related Topics 	  All Built-ins

The ORA_FFI package provides a foreign function interface for invoking C functions in a dynamic library.

Note that float arguments must be converted to doubles.  If you must use ANSI declarations, use only doubles within your code.


About the ORA_NLS package

  Related Topics 	  All Built-ins

The ORA_NLS package enables you to extract high-level information about your current language environment.  This information can be used to inspect attributes of the language, enabling you to customize your applications to use local date and number format.  Information about character set collation and the character set in general can also be obtained.

Facilities are also provided for retrieving the name of the current language and character set, allowing you to create applications that test for and take advantage of special cases.


ORA_NLS character constants

  Related Topics

Use the following constants to retrieve character information about the current language.  All of the constants are of type PLS_INTEGER, with each assigned an integer value.

Name	Description	Integer	Value
day1	full name of day 1	1	sunday
day2	full name of day 2	2	monday
day3	full name of day 3	3	tuesday
day4	full name of day 4	4	wednesday
day5	full name of day 5	5	thursday
day6	full name of day 6	6	friday
day7	full name of day 7	7	saturday
day1_abbr	abbr. name of day 1	8	sun
day2_abbr	abbr. name of day 2	9	mon
day3_abbr	abbr. name of day 3	10	tue
day4_abbr	abbr. name of day 4	11	wed
day5_abbr	abbr. name of day 5	12	thu
day6_abbr	abbr. name of day 6	13	fri
day7_abbr	abbr. name of day 7	14	sat
mon1	full name of month 1	15	january
mon2	full name of month 2	16	february
mon3	full name of month 3	17	march
mon4	full name of month 4	18	april
mon5	full name of month 5	19	may
mon6	full name of month 6	20	june
mon7	full name of month 7	21	july
mon8	full name of month 8	22	august
mon9	full name of month 9	23	september
mon10	full name of month 10	24	october
mon11	full name of month 11	25	november
mon12	full name of month 12	26	december
mon1_abbr	abbr. name of month 1	27	jan
mon2_abbr	abbr. name of month 2	28	feb
mon3_abbr	abbr. name of month 3	29	mar
mon4_abbr	abbr. name of month 4	30	apr
mon5_abbr	abbr. name of month 5	31	may
mon6_abbr	abbr. name of month 6	32	jun
mon7_abbr	abbr. name of month 7	33	jul
mon8_abbr	abbr. name of month 8	34	aug
mon9_abbr	abbr. name of month 9	35	sep
mon10_abbr	abbr. name of month 10	36	oct
mon11_abbr	abbr. name of month 11	37	nov
mon12_abbr	abbr. name of month 12	38	dec
yes_str	Affirmative response for queries	39	yes
no_str	Negative response for queries	40	no
am_str	Local equivalent of AM	41	am
pm_str	Local equivalent of PM	42	pm
ad_str	Local equivalent of AD	43	ad
bc_str	Local equivalent of BC	44	bc
decimal	Decimal character	45	.
groupsep	Group separator	46	,
int_currency	Int. currency symbol	47	USD
local_currency	Local currency symbol	48	$
local_date_fmt	Local date format	49	%m/%d/%y
local_time_fmt	Local time format	50	%H:%M:%S
default_date_fmt	Oracle Default date format	51	DD-MON-YY
default_time_fmt	Oracle Default time format	52	HH.MI.SS AM
language	Language name	53	AMERICAN
language_abbr	ISO abbreviation for language	54	US
character_set	Default character set name	55	US7ASCII
territory	Default territory name	56	AMERICA
current_decimal	Current decimal character	57	.
current_groupsep	Current group separator	58	,
current_currency	Current local currency	59	$
current_date_fmt	Current Oracle Date format	60	DD-MON-YY
current_language	Current language	70
current_territory	Current territory	61	US
current_character_set	Current character set	62	US7ASCII


ORA_NLS numeric constants

  Related Topics

Use the following constants to retrieve numeric information about the current language.  All of the constants are of type PLS_INTEGER, with each assigned an integer value.

Name	Description	Integer
decimal_places	Currency Decimal Places	63
sign_placement	Sign location: 0=before, 1=after	64
initcap_month	Initcap month names: 0=NO,1=YES	65
initcap_day	Initcap day names: 0=NO,1=YES	66
week_start	Week start day: 0=sunday	67
week_num_calc	Week num calc: 1=ISO, 0=non ISO	68
iso_alphabet	Current ISO alphabet number	69


About the ORA_PROF package

  Related Topics 	  All Built-ins

The ORA_PROF package contains procedures, functions, and exceptions you can use when tuning your PL/SQL program units.  The services in this package allow you to track the amount of time pieces of your code take to run.


About the TEXT_IO package

  Related Topics 	  All Built-ins

The TEXT_IO Package contains constructs that provide ways to write and read information to and from files.  There are several procedures and functions available in Text_IO, falling into the following categories:

file operations	The FILE_TYPE record, the FOPEN and IS_OPEN functions, and the FCLOSE procedure enable you to define FILE_TYPE variables, open files, check for open files, and close open files, respectively.
output (write) operations	The PUT, PUTF, PUT_LINE, and NEW_LINE procedures enable you to write information to an open file or output it to the Interpreter.
input (read) operations	The GET_LINE procedure enables you to read a line from an open file.


Using TEXT_IO constructs example

  Related Topics

Below is an example of a procedure that echoes the contents of a file.  Notice that the procedure includes several calls to TEXT_IO constructs:

PROCEDURE echo_file_contents IS
  in_file   Text_IO.File_Type;
  linebuf   VARCHAR2(1800);
  filename  VARCHAR2(30);
BEGIN
  filename:=GET_FILE_NAME('c:\temp\', File_Filter=>'Text Files (*.txt)|*.txt|');
  in_file := Text_IO.Fopen(filename, 'r');
  LOOP
    Text_IO.Get_Line(in_file, linebuf);
    :text_item5:=:text_item5||linebuf||chr(10);
    --Text_IO.New_Line;
  END LOOP;
EXCEPTION
  WHEN no_data_found THEN
    Text_IO.Put_Line('Closing the file...');
    Text_IO.Fclose(in_file);
END;


About the TOOL_ENV package

  Related Topics 	  All Built-ins

The TOOL_ENV package allows you to interact with Oracle environment variables by retrieving their values for use in subprograms.


About the TOOL_ERR package

  Related Topics 	  All Built-ins

In addition to using exceptions to signal errors, some built-in packages (e.g., the DEBUG package) provide additional error information.  This information is maintained in the form of an "error stack".

The error stack contains detailed error codes and associated error messages.  Errors on the stack are indexed from zero (oldest) to n-1 (newest), where n is the number of errors currently on the stack.  Using the services provided by the TOOL_ERR package, you can access and manipulate the error stack.


Using TOOL_ERR constructs example

  Related Topics

The following procedure shows how you can use constructs within the TOOL_ERR package to handle errors generated by  the Debug.Interpret built-in:

PROCEDURE error_handler IS
/* Call a built-in that interprets a command */
BEGIN
  Debug.Interpret('.ATTACH LIB LIB1');
EXCEPTION
/*
** Check for a specific error code, print the
** message, then discard the error from the stack
** If the error does not match, then raise it.
*/
  WHEN OTHERS THEN
    IF Tool_Err.Code = Tool_Err.Encode('DEPLI',18) THEN
      Text_IO.Put_Line(Tool_Err.Message);
      Tool_Err.Pop;
    ELSE
      RAISE;
    END IF;
END;

If the exception handling code did not make use of TOOL_ERR constructs, you would have received an error alert displaying the message PDE-PLI018: Could not find library LIB1.  Using TOOL_ERR constructs, the error is caught and the message is sent to the Interpreter.


About the TOOL_RES package

  Related Topics 	  All Built-ins

The TOOL_RES package provides you with a means of extracting string resources from a resource file.  The goal is to ease porting of PL/SQL code from one language to another by isolating all of the Textual Data in the resource file.


Building resource files

  Related Topics

In addition to extracting Textual Data from existing resource files, you can use the following utilities to create resource files that contain Textual Data.

RESPA60	Is a utility that generates a resource file (.RES) from a Text File (.PRN).  The resulting resource file can be used with the TOOL_RES Package.
RESPR60	Is a utility that converts a resource file (.RES) to a Text File (.PRN).
These utilities are distributed with Oracle*Terminal and are installed automatically with this product.  To display the supported command line syntax of these utilities on your platform, run the utilities without supplying any arguments.

In Microsoft Windows, you can invoke these executables from the Explorer or File Manager to display their command line syntax.  To run the executables with arguments, use Run.

Resource File Syntax	Use the following syntax when you create strings for the resource file:

Resource	resource_name"
Type	string"
Content
 table
 {
  string string 1 character_count
  "content of string"
 }

where:

resource_name	Is a unique name that you can reference with Tool_Res.Rfread.
character_count	Is the number of characters in the string contents.
content of string	Is the actual string.
Example	The following Text file, HELLO.PRN:

Resource "hello_world"
Type "string"
Content
 table
 {
  string string 1 12
  "Hello World!"
 }

Resource "goodbye_world"
Type "string"
Content
 table
 {
  string string 1 14
  "Goodbye World!"
 }

is generated into the resource file HELLO.RES using the RESPA60 utility,  and referenced by the following program unit:

PROCEDURE get_res IS
  resfileh Tool_Res.Rfhandle;
  hellor   VARCHAR2(16);
  goodbyer VARCHAR2(16);
BEGIN
/*Open the resource file we generated */
  resfileh:=Tool_Res.Rfopen('hello.res');

/*Get the resource file strings*/
  hellor:=Tool_Res.Rfread(resfileh, 'hello_world');
  goodbyer:=Tool_Res.Rfread(resfileh, 'goodbye_world');

/*Close the resource file*/
  Tool_Res.Rfclose(resfileh);

/*Print the resource file strings*/
  Text_IO.Put_Line(hellor);
  Text_IO.Put_Line(goodbyer);
END;


About the EXEC_SQL package

  Related Topics 	  All Built-ins

The EXEC_SQL package allows you to access multiple Oracle database servers on several different connections at the same time. Connections can also be made to ODBC data sources via the Open Client Adapter (OCA), which is supplied with Developer. To access non-Oracle data sources, you must install OCA and an appropriate ODBC driver.

The EXEC_SQL package contains procedures and functions you can use to execute dynamic SQL within PL/SQL procedures. Like the DBMS_SQL package, the SQL statements are stored in character strings that are only passed to or built by your source program at runtime. You can issue any data manipulation language (DML) or data definition language (DDL) statement using the EXEC_SQL package.

The EXEC_SQL package differs from the DMBS_SQL package in the following ways:

•	Uses bind by value instead of bind by address

•	Must use EXEC_SQL.Variable_Value to retrieve the value of an OUT bind parameter

•	Must use EXEC_SQL.Column_Value after fetching rows to retrieve the values in a result set

•	Does not support CHAR, RAW, LONG or ROWID data

•	Does not provide a CANCEL_CURSOR procedure or function

•	Does not support the array interface

•	Indicator variables are not required because nulls are fully supported as values of PL/SQL variables

•	Does not support PL/SQL tables or record types

For more information about the DBMS_SQL package, see your Oracle8 Application Developer's Guide.


Connection and cursor handles

  Related Topics

In a Developer application, you can have several connections to one or more databases at the same time. However, there is always one primary database connection, which we refer to as the primary Developer connection.

Handles are used to reference the Oracle or ODBC connections in your Developer application. When you open connections to the primary database or to other databases, connection handles of type EXEC_SQL.ConnType are created and used to reference the connections. Each connection handle refers to one database connection.

When you open a cursor on a connection handle, cursor handles of type EXEC_SQL.CursType are created and used to reference the cursor on the given connection. Each connection handle can have many cursor handles.

Data can be accessed after a connection and a cursor are opened. If you have multiple connections simultaneously opened, it is recommended that you explicitly include the specific handles as arguments in your EXEC_SQL routines.

If you are only accessing data from the primary Developer connection, then you do not need to specify the connection in the EXEC_SQL routines. When no handle is supplied to the EXEC_SQL routine, EXEC_SQL.Default_Connection is automatically called to obtain the primary Developer connection.


Retrieving result sets from queries or non-Oracle stored procedures

  Related Topics

The EXEC_SQL package is particularly useful when you need to retrieve result sets from different Oracle or ODBC data sources into one form or report.

To process a statement that returns a result set:

1	For each column, use EXEC_SQL.Define_Column to specify the variable for receiving the value.

2	Execute the statement by calling EXEC_SQL.Execute.

3	Use EXEC_SQL.Fetch_Rows to retrieve a row in the result set.

4	Use EXEC_SQL.Column_Value to obtain the value of each column retrieved by EXEC_SQL.Fetch_Rows.

5	Repeat 3 and 4 until EXEC_SQL.Fetch_Rows returns 0.


EXEC_SQL predefined exceptions

  Related Topics

EXEC_SQL.Invalid_Connection	An invalid connection handle is passed.
EXEC_SQL.Package_Error	Any general error. Use EXEC_SQL. Last_Error_Code and EXEC_SQL.Last_Error_Mesg to retrieve the error.
EXEC_SQL.Invalid_Column_Number	The EXEC_SQL.Describe_Column procedure encountered a column number that does not exist in the result set.
EXEC_SQL.Value_Error	The EXEC_SQL.Column_Value encountered a value that is different from the original value retrieved by EXEC_SQL.Define_Column.


Using the EXEC_SQL package

  Related Topics

Executing arbitrary SQL against any connection

Copying data between two databases

Executing a non-Oracle database stored procedure and fetching its result set


Executing arbitrary SQL against any connection

  Related Topics

The following procedure passes a SQL statement and an optional connection string of the form 'user[/password][@data source]'.  If a connection string is passed, the procedure executes the SQL statement against the data source, otherwise it implements it against the primary Developer connection.

PROCEDURE exec (sql_string IN VARCHAR2,   connection_string IN VARCHAR2 DEFAULT NULL) IS   connection_id EXEC_SQL.ConnType;   cursor_number EXEC_SQL.CursType;   ret           PLS_INTEGER; BEGIN IF connection_string IS NULL THEN   connection_id := EXEC_SQL.DEFAULT_CONNECTION; ELSE   connection_id :=     EXEC_SQL.OPEN_CONNECTION(connection_string); END IF; cursor_number :=    EXEC_SQL.OPEN_CURSOR(connection_id); EXEC_SQL.PARSE(connection_id, cursor_number, sql_string); ret := EXEC_SQL.EXECUTE(connection_id, cursor_number); EXEC_SQL.CLOSE_CURSOR(connection_id, cursor_number); EXEC_SQL.CLOSE_CONNECTION(connection_id); EXCEPTION   WHEN EXEC_SQL.PACKAGE_ERROR THEN     TEXT_IO.PUT_LINE('ERROR (' ||       TO_CHAR(EXEC_SQL.LAST_ERROR_CODE        (connection_id)) || '): ' ||       EXEC_SQL.LAST_ERROR_MESG(connection_id));     IF EXEC_SQL.IS_CONNECTED(connection_id) THEN       IF EXEC_SQL.IS_OPEN(connection_id,         cursor_number) THEN         EXEC_SQL.CLOSE_CURSOR(connection_id,          cursor_number);       END IF;       EXEC_SQL.CLOSE_CONNECTION(connection_id);     END IF;  END;	-- Open a new connection.  If the connection string is empty, assume the user wants to use the primary Developer connection. -- Open a cursor on the connection for executing the SQL statement. -- Parse the SQL statement on the given connection. -- And execute it.  If the connection is Oracle, any DDL is done at parse time, but if the connection is a non-Oracle data source, this is not guaranteed. -- Close the cursor. -- And we are done with the connection. The connection_id we have may come from calling EXEC_SQL.OPEN_CONNECTION or EXEC_SQL.DEFAULT_CONNECTION. Regardless, we should call  EXEC_SQL.CLOSE_CONNECTION. If the connection_id was obtained by EXEC_SQL.OPEN_CONNECTION, EXEC_SQL.CLOSE_CONNECTION will terminate that connection. If the connection_id was obtained by EXEC_SQL.DEFAULT_CONNECTION, EXEC_SQL.CLOSE_CONNECTION will NOT terminate that connection, but it frees up EXEC_SQL package specific resources. -- This is the general error raised by the EXEC_SQL package, and denotes an unexpected error in one of the calls. It prints the error number and error message to standard out.


Copying data between two databases

  Related Topics

The following procedure does not specifically require the use of dynamic SQL, but it illustrates the concepts in the EXEC_SQL package.

The procedure copies the rows from the source table (on the source connection) to the destination table (on the destination connection).  It assumes the source and destination tables have the following columns:

ID of type NUMBER
NAME of type VARCHAR2(30)
BIRTHDATE of type DATE

PROCEDURE copy (source_table IN VARCHAR2,   destination_table IN VARCHAR2,   source_connection IN VARCHAR2 DEFAULT NULL,   destination_connection IN VARCHAR2 DEFAULT NULL) IS   id                 NUMBER;   name               VARCHAR2(30);   birthdate          DATE;   source_connid      EXEC_SQL.ConnType;   destination_connid EXEC_SQL.ConnType;   source_cursor      EXEC_SQL.CursType;   destination_cursor EXEC_SQL.CursType;   ignore             PLS_INTEGER BEGIN   IF source_connection IS NULL THEN     source_connid := EXEC_SQL.DEFAULT_CONNECTION;   ELSE     source_connid :=        EXEC_SQL.OPEN_CONNECTION(source_connection);   END IF;   IF destination_connection IS NULL THEN     destination_connid := EXEC_SQL.CURR_CONNECTION;   ELSE     destination_connid :=        EXEC_SQL.OPEN_CONNECTION(destination_connection);   END IF;   source_cursor := EXEC_SQL.OPEN_CURSOR(source_connid);   EXEC_SQL.PARSE(source_connid, source_cursor,     'SELECT id, name, birthdate FROM ' || source_table);   EXEC_SQL.DEFINE_COLUMN(source_connid, source_cursor, 1,      id);   EXEC_SQL.DEFINE_COLUMN(source_connid, source_cursor, 2,      name, 30);   EXEC_SQL.DEFINE_COLUMN(source_connid, source_cursor, 3,      birthdate);   ignore := EXEC_SQL.EXECUTE(source_connid, source_cursor);    destination_cursor :=      EXEC_SQL.OPEN_CURSOR(destination_connid);   EXEC_SQL.PARSE(destination_connid, destination_cursor,      'INSERT INTO ' || destination_table || '      (id, name, birthdate) VALUES (:id, :name, :birthdate)');   LOOP     IF EXEC_SQL.FETCH_ROWS(source_connid, source_cursor) > 0     THEN       EXEC_SQL.COLUMN_VALUE(source_connid, source_cursor,          1, id);       EXEC_SQL.COLUMN_VALUE(source_connid, source_cursor,          2, name);       EXEC_SQL.COLUMN_VALUE(source_connid, source_cursor,          3, birthdate);       EXEC_SQL.BIND_VARIABLE(destination_connid,         destination_cursor, ':id', id);       EXEC_SQL.BIND_VARIABLE(destination_connid,         destination_cursor, ':name', name);       EXEC_SQL.BIND_VARIABLE(destination_connid,         destination_cursor, ':birthdate', birthdate);       ignore := EXEC_SQL.EXECUTE(destination_connid,         destination_cursor);     ELSE       EXIT;     END IF;   END LOOP;   EXEC_SQL.PARSE(destination_connid, destination_cursor,      'commit');   ignore := EXEC_SQL.EXECUTE(destination_connid,     destination_cursor);   EXEC_SQL.CLOSE_CURSOR(destination_connid,     destination_cursor);   EXEC_SQL.CLOSE_CURSOR(source_connid, source_cursor);   EXEC_SQL.CLOSE_CONNECTION(destination_connid);   EXEC_SQL.CLOSE_CONNECTION(source_connid); EXCEPTION   WHEN EXEC_SQL.PACKAGE_ERROR THEN     IF EXEC_SQL.LAST_ERROR_CODE(source_connid) != 0 THEN       TEXT_IO.PUT_LINE('ERROR (source: ' ||          TO_CHAR(EXEC_SQL.LAST_ERROR_CODE(source_connid))         || '): ' ||         EXEC_SQL.LAST_ERROR_MESG(source_connid));     END IF;     IF EXEC_SQL.LAST_ERROR_CODE(destination_connid) != 0 THEN       TEXT_IO.PUT_LINE('ERROR (destination: ' ||         TO_CHAR(EXEC_SQL.LAST_ERROR_CODE(destination_connid))         || '): ' ||         EXEC_SQL.LAST_ERROR_MESG(destination_connid));     END IF;     IF EXEC_SQL.IS_CONNECTED(destination_connid) THEN       IF EXEC_SQL.IS_OPEN(destination_connid,         destination_cursor) THEN         EXEC_SQL.CLOSE_CURSOR(destination_connid,           destination_cursor);       END IF;       EXEC_SQL.CLOSE_CONNECTION(destination_connid);     END IF;      IF EXEC_SQL.IS_CONNECTED(source_connid) THEN       IF EXEC_SQL.IS_OPEN(source_connid, source_cursor) THEN         EXEC_SQL.CLOSE_CURSOR(source_connid, source_cursor);       END IF;       EXEC_SQL.CLOSE_CONNECTION(source_connid);     END IF;  END;	-- Open the connections. If the user does not specify a secondary connection, the primary  Developer connection is used. -- Prepare a cursor to select from the source table. -- Prepare a cursor to insert into the destination table. -- Fetch a row from the source table, and insert it into the destination table. -- Get column values for the row; these are stored as local variables.  -- Bind the values into the cursor that inserts into the destination table.  -- No more rows to copy. -- Commit the destination cursor. -- And close everything. -- This is the general error raised by the EXEC_SQL package. Get information (error number and message) about the error on the source connection or the destination connection. -- Close all connections and cursors.


Executing a non-Oracle database stored procedure and fetching its result set

  Related Topics

The following procedure executes a Microsoft SQL Server stored procedure that returns a result set, then fetches the result set.  The stored procedure is:

create proc example_proc @id integer as
  select ename from emp where empno = @id

The procedure executes the stored procedure on the primary Developer connection (assuming it is a SQL Server connection), and prints out all lines returned. It is also assumed that the primary Developer connection is already opened before executing procedure example3; otherwise an error will occur.

CREATE PROCEDURE example3 (v_id IN NUMBER) IS   v_ename VARCHAR2(20);   v_cur EXEC_SQL.CursType;   v_rows INTEGER; BEGIN   v_cur := EXEC_SQL.OPEN_CURSOR;   EXEC_SQL.PARSE(v_cur, '{ call example_proc ( :v_id ) }');   EXEC_SQL.BIND_VARIABLE(v_cur, ':v_id', v_id);   EXEC_SQL.DEFINE_COLUMN(v_curs, 1, v_ename, 20);   v_rows := EXEC_SQL.EXECUTE(v_curs);   WHILE EXEC_SQL.FETCH_ROWS(v_curs) > 0 LOOP     EXEC_SQL.COLUMN_VALUE(v_curs, 1, v_ename);     TEXT_IO.PUT_LINE('Ename = ' || v_ename);   END LOOP;   EXEC_SQL.CLOSE_CURSOR(v_cur);   EXCEPTION     WHEN EXEC_SQL.PACKAGE_ERROR THEN       TEXT_IO.PUT_LINE('ERROR (' ||         TO_CHAR(EXEC_SQL.LAST_ERROR_CODE)         || '): ' ||         EXEC_SQL.LAST_ERROR_MESG);       EXEC_SQL.CLOSE_CURSOR(v_cur);     WHEN EXEC_SQL.INVALID_CONNECTION THEN       TEXT_IO.PUT_LINE('ERROR: Not currently connected         to a database'); END example3;	-- When no connection handle is passed, EXEC_SQL uses the primary Developer  connection. -- To call stored procedures against ODBC datasources, use ODBC syntax, but parameters should be specified as Oracle parameters. -- The exception INVALID_CONNECTION is raised when there is no default connection.


Alphabetic list of packaged subprograms

DDE.App_Begin

DDE.App_End

DDE.App_Focus

DDE.DMLERR_Not_Supported

DDE.Execute

DDE.Getformatnum

DDE.Getformatstr

DDE.Initiate

DDE.IsSupported

DDE.Poke

DDE.Request

DDE.Terminate

Debug.Break

Debug.Getx

Debug.Interpret

Debug.Setx

Debug.Suspend

EXEC_SQL.Open_Connection

EXEC_SQL.Curr_Connection

EXEC_SQL.Default_Connection

EXEC_SQL.Open_Cursor

EXEC_SQL.Parse

EXEC_SQL.Describe_Column

EXEC_SQL.Bind_Variable

EXEC_SQL.Define_Column

EXEC_SQL.Execute

EXEC_SQL.Execute_And_Fetch

EXEC_SQL.Fetch_Rows

EXEC_SQL.More_Result_Sets

EXEC_SQL.Column_Value

EXEC_SQL.Variable_Value

EXEC_SQL.Is_Open

EXEC_SQL.Close_Cursor

EXEC_SQL.Is_Connected

EXEC_SQL.Is_OCA_Connection

EXEC_SQL.Close_Connection

EXEC_SQL.Last_Error_Position

EXEC_SQL.Last_Row_Count

EXEC_SQL.Last_SQL_Function_Code

EXEC_SQL.Last_Error_Code

EXEC_SQL.Last_Error_Mesg

List.Appenditem

List.Destroy

List.Deleteitem

List.Fail

List.Getitem

List.Insertitem

List.Listofchar

List.Make

List.Nitems

List.Prependitem

OLE2.Add_Arg

OLE2.Create_Arglist

OLE2.Destroy_Arglist

OLE2.Get_Char_Property

OLE2.Get_Num_Property

OLE2.Get_Obj_Property

OLE2.Invoke

OLE2.Invoke_Num

OLE2.Invoke_Char

OLE2.Invoke_Obj

OLE2.IsSupported

OLE2.List_Type

OLE2.Obj_Type

OLE2.OLE_Not_Supported

OLE2.Release_Obj

OLE2.Set_Property

Ora_FFI.Find_Function

Ora_FFI.Find_Library

Ora_FFI.Funchandletype

Ora_FFI.Generate_Foreign

Ora_FFI.Is_Null_Ptr

Ora_FFI.Libhandletype

Ora_FFI.Load_Library

Ora_FFI.Pointertype

Ora_FFI.Register_Function

Ora_FFI.Register_Parameter

Ora_FFI.Register_Return

Ora_NLS.American

Ora_NLS.American_Date

Ora_NLS.Bad_Attribute

Ora_NLS.Get_Lang_Scalar

Ora_NLS.Get_Lang_Str

Ora_NLS.Linguistic_Collate

Ora_NLS.Linguistic_Specials

Ora_NLS.Modified_Date_Fmt

Ora_NLS.No_Item

Ora_NLS.Not_Found

Ora_NLS.Right_to_Left

Ora_NLS.Simple_CS

Ora_NLS.Single_Byte

Ora_Prof.Bad_Timer

Ora_Prof.Create_Timer

Ora_Prof.Destroy_Timer

Ora_Prof.Elapsed_Time

Ora_Prof.Reset_Timer

Ora_Prof.Start_Timer

Ora_Prof.Stop_Timer

Text_IO.FClose

Text_IO.File_Type

Text_IO.Fopen

Text_IO.Is_Open

Text_IO.Get_Line

Text_IO.New_Line

Text_IO.Put

Text_IO.PutF

Text_IO.Put_Line

Tool_Env.Getvar

Tool_Err.Clear

Tool_Err.Code

Tool_Err.Encode

Tool_Err.Message

Tool_Err.Nerrors

Tool_Err.Pop

Tool_Err.Tool_Error

Tool_Err.Toperror

Tool_Res.Bad_File_Handle

Tool_Res.Buffer_Overflow

Tool_Res.File_Not_Found

Tool_Res.No_Resource

Tool_Res.Rfclose

Tool_Res.Rfhandle

Tool_Res.Rfopen

Tool_Res.Rfread


No packaged suprograms begin with this letter


No OLE2 packaged subprograms begin with this letter


Help topic not found.  Check the online help index for related topics.


Glossary

A

    action
    active window/view
    ActiveX
    Ada
    aggregation
    alert
    alignment
    alias
    All tool
    ancestor
    ancestor group
    anchor
    anchor point
    anonymous block
    antecedent
    applet
    application
    argument
    ASCII
    attached library
    attribute
    attribute columns
    attribute mask
    Attribute tool
    attribute value
    axis chart

 B

    background element
    background process
    baseline value
    Batch
    batch compile
    bind reference
    bind variable
    block
    body
    boilerplate
    border
    bounding box
    break chart
    break column
    break group
    break report
    break trigger
    breakpoint
    builder
    built-in datatype
    built-ins
    built-in macro
    buffer
    button
    button procedure

C

    cache (memory)
    call interface
    call stack
    canvas
    canvas view
    cartridge
    cascading style sheet
    category
    category axis
    cell
    CGI
    CGM
    CHAR datatype
    chart element
    chart item
    chart template
    check box
    checksum
    child
    child query
    classification
    clause
    client
    client/server architecture
    Clipboard
    CMDFILE
    collection type
    color palette
    column
    column object
    command line
    comment
    commit
    comparison operators
    compile
    component
    concurrency
    condition
    confine mode
    connect
    connect string
    constraint
    construct
    context area
    continuous axis
    control point
    coordinate plane
    coordinate system
    coordinates (x, y)
    copy
    correlated subquery
    cross product
    crosstab
    cursor
    custom measure
    cut

D

    damage
    data dictionary
    data link
    data model
    data structure node
    database
    database trigger
    datasource
    datatype
    DATE
    date axis
    debug
    debug action
    debug trigger
    Debugger
    deconstructed object
    default
    deliver
    dependency tree
    dependency view
    dependent data
    descendant
    designer
    Designer (Oracle)
    detail query
    dialog box
    DIANA
    dimension
    dimension hierarchy
    dimension value
    disabled
    discrete axis
    display
    display item
    downward-growing
    drag
    drill
    duplicate
    dynamic saved selection

E

    EBCDIC
    edge
    Edge/Fill/Text Display
    editor
    element
    element type
    Ellipsis button
    enabled
    enclosing object
    encryption
    environment
    exception
    Exception tool
    executable argument
    execute
    export
    export file
    expression
    external PL/SQL library
    external query

F

    family
    Family tool
    field
    field template
    file node
    fill area
    filter
    firewall
    flattened object
    flex mode
    focus
    foreground element
    foreign key
    form layout
    form letter layout
    format mask
    format trigger
    formula
    formula column
    frame
    function

G

    generate
    Generate
    Global Registry
    global variable
    grant
    gridlines
    group
    group filter
    group tree
    GUI

H

    handle
    header
    heading node
    hidden
    hierarchy
    HTML
    HTTP
    hyperlink
    hypertext

I

    ICD
    icon
    image
    implied item
    import
    independent data
    index
    inherit
    inner bounding box
    input item
    insert mode
    internet
    Interpreter script
    intranet
    IP (Internet Protocol) Address
    item
    item node

J

    JAR
    Java
    join
    justification

K

    keyword

L

    label
    Launcher
    level
    Level tool
    layout
    layout unit
    lexical reference
    library
    link
    link file
    list box
    list item
    list of values
    List tool
    local database
    local registry
    local variable
    logical operators
    logical page
    loop

M

    macro
    mailing label layout
    margin
    master/detail layout
    Match tool
    matrix cell
    matrix layout
    matrix report
    measure
    megabyte (Mb)
    message box
    method
    modal window
    modeless window
    module
    multi-line field

N

    NA value
    nested matrix
    NOCACHE
    node
    non-caching column
    NULL value
    numeric operators

O

    object
    object column
    object group
    object handle
    Object Navigator
    object table
    object type
    ODBC
    OLE
    OLE container
    OLE Server
    Oracle datatype
    Oracle Designer
    ORACLE_HOME
    organization node
    origin
    outer bounding box
    overflow

P

    packaged function
    package
    package body
    package specification
    page
    page break
    palette
    pane
    panel
    parameter
    parameter list
    parent
    paste
    pattern
    Pcode
    PDF
    physical page
    placeholder username
    plot type
    PL/SQL
    pld file
    pll file
    pls file
    plx file
    pop-up list
    port
    pre-defined action
    pre-defined type
    preference
    preview
    Previewer
    primary key
    primitive
    printer control code
    prt file
    procedure
    program unit
    project
    project file
    project item
    Project Navigator
    project node
    project registry
    project view
    Project Wizard
    property
    property class
    protocol

Q

    qualifying dimension
    query
    query filter function
    quit

R

    radio button
    radio group
    Range tool
    RC4
    RDBMS
    rdf file
    rep file
    read consistency
    record
    record group
    REF column
    reference line
    refresh
    register
    registry
    relational operator
    remote database
    repeating frame
    replace mode
    report-level objects
    Reports Background Engine (RWRBE60)
    Reports Queue Manager (RWRQM60)
    Reports Server (RWMTS60)
    Reports Web Cartridge
    Reports Web CGI (RWCGI60)
    rex file
    RGB
    root
    root node
    row
    row object
    RTF
    run
    runfile
    Runtime
    Runtime Parameter Form

S

    saved selection
    Saved Selection tool
    schema
    scope
    script
    section
    SELECT statement
    selection
    selection script
    Selector
    Selector tool
    session
    sibling
    socket
    Sort tool
    source
    specification
    split bar
    SQL
    sql file
    SQL script
    SQL statement
    stack
    statement
    static saved selection
    stored program unit
    stored subprogram
    style sheet
    subprogram
    subproject
    subproject node
    summary column
    SYLK
    syntax
    system variable

T

    table
    table type
    tabular
    target
    target node
    TCP
    tear-off menu
    text item
    title bar
    title page
    toggle
    tool
    toolbar
    tool palette
    Top/Bottom tool
    trailer
    transaction
    trigger
    type

U

    update
    URL
    user exit
    user-defined action
    user-defined type
    user-defined macro
    user registry

V

    valid XML
    value axis
    value construct
    variable
    varying array type
    VBX
    VBX control
    view
    virtual directory
    virtual file system
    visual attribute

W

    Web
    Web browser
    Web cartridge
    Web link
    Web server
    well-formed XML
    wildcard
    window
    WKS
    WRB
    WWW

X

    XML

Y

Z

    zoom


In Project Builder, a command string supplied either by Project Builder or by the user that applies to files of a given type.  An action is not restricted to a single file type; for example, if the action "Compile" is defined for both forms and C source files, selecting "Compile Project" will compile all .fmb and .c files using the appropriate tools.  See also:  pre-defined action, user-defined action.


A high-level programming language developed by the U.S. Department of Defense for use in embedded computer systems.


A window or view that can receive user input.


(Oracle Express) The consolidation of data for several dimension values into a single value, such as the total units sold for all the cities, or into a smaller set of values, such as the average units sold for cities in each region. Data is often collected at the lowest level of detail and is aggregated into higher level totals for analysis.


A modal window that notifies you of a condition that occurred because of your last action.  You must respond to an alert.


The way in which data is positioned in a field.  It may be positioned to the left, right, center, flush/left, flush/right, or flush/center of the defined width of a field.


A secondary name used in a SQL statement to reference a table, view, or column.


(Oracle Express) A Selector dialog box tool that allows you to select all of the values in a dimension, or all of the values in a dimension for a specific hierarchy.


(Oracle Express) A dimension value at any level above a particular value in a hierarchy. The ancestor value is the aggregated total of the values of its descendants.  The following example shows the dimension value "Europe" as the ancestor of "France," "Lyon," and "Paris" in the GEOGRAPHY dimension.


A group that owns another group, either directly or indirectly.


A layout object used to fix a spot on one object to a spot on another object, ensuring the position of the first object in relation to the second object.


(Oracle Express) A specific dimension value that is used when selecting dimension values based on their family relationship or when navigating through a hierarchy.


A PL/SQL program unit that has no name and does not require the explicit presence of the BEGIN and END keywords to enclose the executable statements.  Since they are unnamed, anonymous blocks cannot be referenced by other program units.


An object that appears in another object's group tree at any position above that other object.  Every object is an antecedent of its descendants.


A Java term for small programs that can be dynamically imported into Web pages or applications as needed.


One or more program modules used to achieve a specific result.  Applications can be nested within other applications.  For example, an application to control a company's inventory could consist of various Form Builder applications for input of data, and various Graphics Builder applications to display the data visually.


1. An optional expression passed to a program unit for the program unit to operate on.
2. Clauses containing keywords and their specified values.


Acronym for American National Standard Code for Information Interchange.


A read only collection of PL/SQL subprograms, usually provided with an application to supply necessary PL/SQL source.  Program units in an attached library are implicitly loaded when they are first called by another program unit at compile-time or runtime.  They remain loaded for quick reuse, which reduces runtime memory requirements and improves the performance of an application.  See also:  library .


1. See property.
2.  A part or component of an Oracle8 object type definition.  Each attribute has a name and an Oracle8 datatype.  When an object table is created based on the object type, the columns in the table correspond to the attributes in the object type definition.  When a column object in a relational table is created based on the object type, the column object contains the equivalent of sub-columns, each of which corresponds to an attribute in the object type definition.  Each Oracle8 object attribute in a table is treated as a separate data item, as if it were a separate column.  This is true for both object tables and column objects in relational tables.
3. (Oracle Express) A descriptive characteristic that is shared by dimension values. Attributes represent logical groupings that allow users to select data based on like characteristics. For example, in a database representing footwear, you can use a shoe color attribute to select all boots, sneakers, and slippers that share the same color.


The columns that compose a column object (Oracle8).


In Graphics Builder, the first element in an attribute descriptor.  It is a 32-bit mask that informs the toolkit of the attributes that will be set or retrieved by a subsequent function call.  Only those elements that have their corresponding bits set in the attribute mask are set or retrieved.


(Oracle Express) A Selector dialog box tool that allows you to select dimension values based on attributes and attribute values. For example, in a database representing soft drinks, you might select all products whose size is 1 liter. In this example, Size is an attribute and 1 liter is an attribute value.


(Oracle Express) The values in the database that make up an attribute. For example, in a database representing ice cream products, the following attribute values might belong to a flavor attribute in a Product dimension: vanilla, chocolate, and strawberry. Dimension values at various levels in the Product dimension -- brand, form, and size, for instance -- might share the same value for flavor.


A type of chart in which the data is plotted according to where it lies along the chart's edges, called axes.  An axis chart may contain two or three axes, each of which may be one of the following types:  discrete, continuous, or date.


The white part of a pattern.  You apply color to the background element using the Fill Color palette.


A non-interactive process that runs in an operating system environment and performs some service or action.  Certain Oracle products use background processes for different tasks, such as performing and coordinating tasks on behalf of concurrent users of the database, processing and delivering electronic messages, and managing printing services.


The value used as the starting point for plotting fields on the continuous axis of a chart.


The executable that executes an application in batch mode, without using a windowing system.


To translate, at once, several PL/SQL program units into a machine executable form.


A reference to a parameter used to replace a single literal value (e.g., a character string, number, or date) appearing anywhere in a PL/SQL construct or a SQL SELECT statement.  For a bind reference, you must precede the parameter name with a colon (:).


A global variable you can create and use outside of a PL/SQL package.


1. The basic program unit in PL/SQL, defined by the keywords DECLARE, BEGIN, EXCEPTION, and END.
2. In Form Builder, a logical container that relates to a database table or view.


1. Contains the same information as the program unit specification, and also includes the actual implementation of the subprogram (i.e., its sequence of actions).  In most cases, only a body must be defined for a subprogram.
2. In Report Builder, a region that contains the bulk of the report layout (text, graphics, data, and computations).  The report body appears between the report header and trailer pages.


Text and/or graphics that appear in a report every time it is run.  In some products this is called "constant" text or graphics.


A user-defined outline around a layout object, usually used to highlight its contents.  Borders are drawn such that half the width of the border lies outside the edge of the object, and half inside the edge.


See inner bounding box, outer bounding box.


An axis chart that displays two categories of data along one axis.


A query column assigned to a break group.


A group used to break or categorize report data.  All data in query columns assigned to a break group appear above the data in columns belonging to other groups.  Each record fetched for a break group appears only once, while multiple related records in other groups can be displayed.


A report that contains categories that break the report data into sets.


A PL/SQL block that executes each time a breakpoint is reached.  See also:  breakpoint.


A debug action you can place at any executable source line in a PL/SQL subprogram.  A breakpoint interrupts execution of the program unit and passes control to the PL/SQL Interpreter.  Breakpoints allow you to incrementally execute a subprogram and search for runtime errors.  See also:  break trigger.


Refers to a component used to create a specific type of document. For example, Form Builder is used to create forms, while Report Builder is used to create reports.


A datatype defined and supported by the Oracle Server.


A collection of extensions to the PL/SQL language that are designed to be used with the software.  Built-ins include datatypes, procedures, functions, exceptions, and constants.


In Project Builder, macro shipped with Project Builder.  See also:  macro.


A temporary storage area for data during the transfer of that data between the computer and a peripheral, or between parts of a computer.  A buffer prevents loss of information due to differences in the speed or timing of the transfer and speeds up certain functions.


1. An interface element used to select an action item, display a dialog box, or acknowledge the current condition.
2. An object in an application that has a PL/SQL procedure associated with it.  The procedure is generally executed upon a user mouse event.


A PL/SQL procedure associated with an application object, that is executed when a specific mouse event occurs on the item at runtime (e.g. clicking the button).  It does this by establishing a hierarchy for the fetched data containing a break group.


A temporary storage place for database data that is currently being accessed or changed by users, or for data that Oracle Server requires to support users. The terms are often used interchangeably.


An interface that enables you to invoke Forms Developer or Reports Developer component executables from other Oracle products, or a 3GL program.


A chain of subprogram calls, from the initial entry point down to the currently executing subprogram.  Each subprogram call is represented by a frame on the downward-growing call stack, in which newly entered subprograms are added to the bottom of the stack.


   See editor.


In Form Builder, the background object on which you place the interface objects that users will interact with in the runtime application.  A canvas view is usually associated with a window.


Manageable objects that plug in to the client, application server, or database through an open API.


See style sheet.


A label component that allows differentiation between information on the basis of non-hierarchical delineation or compartments rather than sensitivity levels.  With classification, they are used as a means of restricting access to information.


See discrete axis.


An instance of data in a spreadsheet (e.g., Microsoft Excel).


Acronym for Common Gateway Interface. The industry-standard technique for running applications on a Web server.  Whereas standard HTML documents retrieved from a Web server are static (the exact same text is retrieved every time) CGI enables a program running on the Web server to communicate with another computer to generate "dynamic" HTML documents in response to user-entered information.


Acronym for Computer Graphics Metafile.  A file format recognized internationally and used to store and transport object-oriented graphics from one system or program to another.


An Oracle datatype provided for ANSI/ISO compatibility.  A CHAR column is a fixed-length column and can contain any printable characters, such as A, 3, &, or blanks, and can have from 1 to 255 characters or can be null.


A bar, line, symbol, or other graphical object that represents a single value for a field.


A bordered rectangle of any size used to embed Graphics Builder charts in a form or report.


A collection of attributes and properties that defines the format of a chart.


A interface element, appearing as a small square, that a user can toggle on or off.


An error-checking algorithm.


1. An object that is a member of a group, and is immediately below that group object in its group tree.  The objects that compose a group object are children of that group.  Every object is a child of its parent.
2. (Oracle Express) A dimension value at the level immediately below a particular value in a hierarchy. Values of children are included in the calculation that produces the aggregated total for a parent.  A dimension value may be a child for more than one parent if the dimension has more than one hierarchy.  The following example shows the dimension values "Lyon" and "Paris" as the children of "France" in the GEOGRAPHY dimension.


See detail query.


A hierarchical level that denotes the sensitivity of the information that is labeled.  Classifications are used as a means of restricting access to information.


A part of a SQL statement that does not constitute the full statement; for example, a "WHERE clause."


A user, software application, or computer that requests the services, data, or processing of another application or computer (the "server").  In a two-task environment, the client is the user process.  In a network environment, the client is the local user process and the server may be local or remote.


Separation of processing between two CPUs, one acting as the server that provides services in a transaction and the other as the client in the transaction, requesting and receiving services.  All responsibilities of shared data management can be processed by the computer running the database management system while the workstations running the database application concentrate on the interpretation and display of data.


A memory buffer.  An object remains on the Clipboard until you cut or copy another object, or until you quit the application.


A user-defined datatype that describes a data unit made up of an indefinite number of elements, all of the same datatype.  Varying array types and table types are collection types.  (Oracle8)


An argument that allows you to specify a file that contains a set of command line arguments for Forms Developer executables.


Contains all the colors available to the windowing system, the drawing surface, or a window and its views.


1. A vertical space in a database table that represents a particular domain of data.  A column has a column name (e.g., ENAME) and a specific datatype (e.g., CHAR).  For example, in a table of employee information, all of the employees' names would constitute one column.  A record group column represents a database column.
2. In Report Builder, a data model object created automatically for each column expression in a query's SELECT list, or created manually to perform summaries, formulas, or act as a placeholder.


In an Oracle8 relational table or object table, a column whose definition is based on an object type.  The column is a composite, the parts of which correspond to the attributes of the object type.


An operating-system command line.  Most Oracle products can be invoked from a command line using a number of executable arguments.


A language construct for the inclusion of explanatory text in a program, the execution of which remains unaffected.


To make changes to data in the database permanent.  Before changes are stored, both the old and new data exist so that changes can be stored or the data can be restored to its prior state.


(Oracle Express)

>	Greater than

<	Less than

=	Equal to

<=	Less than or equal to

>=	Greater than or equal to

<>	Not equal to

For numbers, the operands are widened to the least common type (Integer is preferred over Long, which is preferred over Single, which is preferred over Double). For Strings, the comparison is case-sensitive and is based on the collating sequence used by the language specified in the Windows Control Panel. The result is 0 for FALSE and -1 for TRUE.


To translate a source program into a binary, executable format.  PL/SQL program units must be compiled before they can be executed.


A specific target object that is a part of a larger application; e.g. a form in an order entry system, or a library that is shared among many other elements.  See also:  target.


The simultaneous access of the same data by multiple users executing different database applications or the same application.  In database software concurrency requires additional logic to ensure that all users see consistent data and that all changes are made in the proper order.


An expression whose value is either true or false, such as X> 100.  For example, you can set a condition in a query when you want the query to display only those rows that evaluate as true in your expression.


Layout editor mode that prevents child objects from being moved or resized on or outside their parent objects.


To log on to a database.  You must connect if you want to create or modify queries or access an application stored in a database.


The set of parameters, including a protocol, that SQL*Net uses to connect to a specific Oracle instance on the network.


A rule or restriction concerning a piece of data (such as a NOT NULL restriction on a column) that is enforced at the database level, rather than the object or application level.


A PL/SQL code structure.  There are two types of constructs: non-value constructs do not return a value; value constructs return a value.


A work area in which Oracle Server stores the current SQL statement, and if the statement is a query, the result's column headings and one row of the result.  Also referred to as cursor.


An axis that plots values that begin with one value and continue until they reach another value.  Thus, these values are mathematically related.  Dependent data is usually plotted along this axis, also called the value axis.


The four corner points of the virtual rectangle that constitutes an object's ideal shape.  When you select an object on the layout, its control points appear.  Depending on the object selected, you may be able to modify it by dragging a control point.


The two-dimensional grid on which drawing takes place.


The type of x, y units used to place and size objects in the Layout Editor view.  The coordinate systems available are 1) character, which uses the platform's native character cell size, and 2) real, which can be in units of pixels, centimeters, inches, or points.


The location points for objects appearing in the layout.  x and y coordinates determine the horizontal (x) and vertical (y) placement of objects.


To store a replica of a selected object on the Clipboard, so that it may be pasted elsewhere in an editor if desired.


A subquery based on the same tables as the parent query (i.e., references columns in the tables included in its parent query).


Group that owns two or more other groups and performs a mathematical cross product (i.e., correlates values between them).


See matrix cell.


1. A small icon representing the position of the mouse.  The shape of the cursor varies, depending on the selected tool.
2. An internal pointer to data retrieved by a query.  A cursor points only to one row of data at a time; however, you can use built-in subprograms to move the cursor to any row in the data set.


(Oracle Express) A formula created by a user, which allows fine-tuning of data analysis. You create custom measures using base measures in the database. For example, if the database contains the existing measure Volume Share, you can use this measure to create a custom measure named Volume Share Year Ago. This custom measure would allow you to look at a product's absolute share from the previous year.


To delete one or more objects and store them in the Clipboard, so that they may be pasted elsewhere in an editor, if desired.


A view is damaged when it is totally or partially occluded by another view.


A set of tables and views owned by the database administrator.  It is a central source of information for Oracle Server and other relational databases.


A data model object used to define a master/detail (parent-child) relationship between a group and a query.


A relational model that defines what data should be fetched from the database, what values should be computed, and how data should be ordered in a report.  Report Builder objects that define the data model are queries, groups, columns, parameters, and links.


A source for data returned by a query, including database objects such as tables, views, synonyms, snapshots, and queries stored as views.


In Project Builder, a node in the Project Navigator denoting a project item that governs the structure of an open project.  For example, the Global Registry node denotes the Global Registry, which contains a list of local registries and a list of global type definitions.


A set of dictionary tables and user tables that are treated as a unit.


A stored PL/SQL block that is implicitly executed when a triggering INSERT, UPDATE, or DELETE statement is issued against the associated table in the database.  See also:  debug trigger.


A standard form of data.  Some common Oracle datatypes are CHAR, VARCHAR2, DATE, NUMBER, LONG, RAW, and LONG RAW.


An Oracle Server datatype.  A date column may contain a date and time between January 1, 9999 BC and December 31, 9999 AD.


An axis that plots date values that begin at one date and continue until they reach another date.


To detect, diagnose, and eliminate runtime errors in programs.


A user-specified event placed in a PL/SQL subprogram, usually for the purpose of troubleshooting runtime errors.


A conditional debug action you can place at any executable source line in a PL/SQL subprogram.  If the specified condition is met, the specified action is taken before execution of the subprogram resumes.  See also:  database trigger.


The Procedure Builder functionality within the software component used for testing and debugging.


In Oracle8, object types and objects are composites, built of parts or attributes.  Forms Developer or Reports Developer treats each part/attribute as an independent, individually-selectable data item.  This treatment results in a deconstructed object (sometimes also known as a flattened object).  The object is not an homogeneous entity within the Developer environment.


A piece of data that depends on other data for its value.  For example, an employee's  years of service may have the value 10, which is dependent upon the value of the employee's name.  Also called value data.


A value supplied by the system when a user does not specify a required command parameter or attribute.


To prepare and provide a completed application for distribution and deployment.


In Project Builder, the mechanism used by Project Builder to determine how to compile files that are referenced in projects.  Items toward the top left of the tree depend on items toward the lower right; so, for example, if a header file is either out of date or more recent than the executable file it is used to build, then the Project Builder will rebuild the executable file, given a Build command.  Dependencies also extend to subprojects.  For example, if a subproject consisting of a function library has been rebuilt, the Project Builder "knows" the dependent project will need to be rebuilt in order to use the updated library functions.  See also:  dependency view.


In Project Builder, shows files in the Project Navigator in the order in which they depend on each other, with project nodes at the highest point in the hierarchy, followed by target nodes, which are followed by buildable components of those targets.  For example, an executable form depends on and will be followed by an .fmb file, which may depend on and be followed by a library used for a USEREXIT procedure, and so on.  See also: project view, target.


1. An object that appears in another object's group tree at any position below that other object.  Every object is a descendant of its antecedents.
2. (Oracle Express) A dimension value at any level below a particular value in a hierarchy. Values of descendants are included in the calculation that produces the aggregated total for an ancestor.  The following example shows the dimension values "France," "Lyon," and "Paris" as descendants of "Europe" in the GEOGRAPHY dimension.


The interface used to design different components of a Forms Developer or Reports Developer application.


See Oracle Designer.


An application modeling, design and generation toolset.  Using Oracle Designer, you can generate forms and menus from module definitions recorded in the Oracle Repository.


When defining a master/detail report, the detail query retrieves all related records for each record retrieved by the master, or parent, query.


A partial screen or window that prompts you to enter information necessary to complete an operation.


An intermediate representation of a program unit, generated by the compiler.  The DIANA includes all of the syntactic and semantic information for a compiled program unit.  In order to compile a reference to a program unit, the compiler must have access to the referenced program unit's DIANA.  For example, if program unit A calls program unit B, the DIANA for B must be available before A can be compiled.


(Oracle Express) A type of database object that is a list of values that provide categories for data. A dimension acts as an index for identifying values of a variable. For example, if you have sales data with a separate sales figure for each month, then the data has a MONTH dimension; that is, the data is organized by month. A dimension is similar to a key in a relational database.

Any item of data within a multidimensional variable can be uniquely and completely selected by specifying one member from each of the variable's dimensions. For example, if a sales variable is dimensioned by MONTH, PRODUCT, and MARKET, specifying "January" for the MONTH dimension, "Stereos" for the PRODUCT dimension, and "Eastern Region" for the MARKET dimension uniquely specifies a single cell in the variable. Thus, dimensions offer a concise and intuitive way of organizing and selecting data for retrieval, updating, and performing calculations.

A dimension can be simple, with values that are single text or integer values, or it can be conjoint, with values that are combinations of values in other dimensions. A composite is not a dimension, but it is a conjoint-like internal object that Express treats like a dimension for the purpose of handling sparse data.


(Oracle Express) One element in the list that makes up a dimension. For example, a computer company might have dimension values in the PRODUCT dimension called "LAPPC" and "DESKPC." Values in the GEOGRAPHY dimension might include "Boston" and "Paris." Values in the TIME dimension might include "MAY96" and "JAN97."


An interface element state that means a menu item, button, etc., cannot be used in the current context; i.e., it does not respond to keyboard or mouse input.


An axis that plots distinct values at fixed intervals.  These values are not mathematically related.  Independent data is usually plotted along this axis, also called the category axis.


A Graphics Builder document containing any combination of charts, images, text objects and shapes.


In Form Builder, an item that stores or displays information that must be fetched or assigned programmatically with PL/SQL.


As it pertains to the call stack, in which newly entered subprograms are added to the bottom of the stack.  The earliest frame, corresponding to the initial program entry point, is at the top of the stack, while the latest frame, associated with the most deeply nested subprogram call, is at the bottom of the stack.


Press and hold down a mouse button while you slide the mouse pointer to a particular location in a window.


(Oracle Express) To navigate up and down through the levels of aggregation in a dimension that has a hierarchy. When selecting dimension values or viewing data, you can expand or collapse a dimension hierarchy by drilling down or up in it. Drilling down expands the view to include child values that are associated with parent values in the dimension hierarchy. Drilling up collapses the list of descendant values associated with a parent value in the dimension hierarchy.

You can click on a plus icon ( [image]) to drill down on (expand) the hierarchy or on a minus icon ( [image]) to drill up on (collapse) the hierarchy.

In the Selector, you can click on the drill icon ( [image]) to display the Drill dialog box so you can select a level of detail for the entire dimension.


An option that allows you to copy objects directly on the layout without affecting the contents of the Clipboard.


(Oracle Express) A saved selection that can have different dimension values each time it is evaluated. The selected dimension values might differ from use to use. In contrast, a static saved selection is an unchanging list of dimension values. A dynamic saved selection script might include "Select the last three Months", while the script for a static saved selection might have "Select February 1996, March 1996, and April 1996".


Acronym for Extended Binary-Coded Decimal Interchange Code.


The boundary of an object.


A display box on the Layout Editor tool palette that shows the current settings for the edge, fill, and text patterns and colors.


A work area in which you perform a specific set of tasks, such as creating a program unit or designing an application.


A thing of significance about which you may need to record information.  Elements are described by attributes and associations to other elements.


Any element held in the dictionary is classified as being of a particular type.  Examples of element type are entity, attribute, program module, table, diagram, text, softbox.  Occurrences or instances of these are called elements.


(Oracle Express) Displays a dialog box related to the task you are performing, usually so you can select one or more values that you need.


An interface element state that means that a menu item, button, etc., can be used in the current context, that is, it responds to keyboard or cursor/mouse input.


An object that contains another object.  An object is considered to be enclosed by another object only if all of the following are true:  both objects belong to the same region (Body, Margin, Header, or Trailer);  the outermost of the two objects is a frame or repeating frame;  the outermost of the two objects is behind the other object;  the innermost of the two objects lies entirely within the borders of the other object.


The practice of scrambling (encrypting) data in such a way that only an intended recipient can unscramble (decrypt) and read the data.


The user's computer-based workplace, including the tools typically used and their configurations. For Project Builder, this refers to the subset of tools that are used to complete various tasks related to developing Forms Developer applications.


A warming or error condition generated from a PL/SQL subprogram.


(Oracle Express) A Selector dialog box tool that allows the user to select dimension values associated with data that meets cutoff terms that the user specifies. For example, the user can select all products whose dollar sales were greater than $10,000 for the week ending December 23, 1995 in the Boston market.


An argument you can pass to a product executable, such as 'OPENFILE=my_disp' and 'PRINT=YES'.  These arguments usually are specified when the executable is invoked from a command line.


See run.


To store a copy of an object, module, selected text or image to a file or database.  In Project Builder, the process of writing out a file containing project, type, action, and/or macro definitions in a portable format for distribution to others who may work on heterogeneous platforms.  See also:  export file, import.


In Project Builder, the shareable, portable file created by exporting a project.


1. A PL/SQL construct combining variables, constants, literals, and operations on their values.
2. (Oracle Express) One or more data values that are specified in an Express language program. For example, you can specify expressions as arguments to programs or functions. An expression can be any of the following:

•	A single, literal value (for example, 10)

•	A variable or formula that contains one or more values

•	A function that returns one or more values

•	A calculation that combines values, such as variables, formulas, or functions, with arithmetic or Boolean operators


See library.


An ANSI-standard SQL SELECT statement that can be referenced by other Oracle products.


(Oracle Express) A group of related dimension values that correspond to the levels of the dimension hierarchy. Dimension values within a family can relate to each other as ancestor, parent, child, and descendant.  The following example shows family relationships for the dimension value "France" in the GEOGRAPHY dimension.


(Oracle Express) A Selector dialog box tool that allows the user to select a family of dimension values for a particular hierarchy. A family includes a parent and all of its descendant dimension values. For example, the user can select all of the family members below the Chicago market level in the Geography dimension.


1. An interface element in which you enter, edit, or delete data.  2. In Graphics Builder or Report Builder, a layout object that define how the data for a specific query column appears.


In Graphics Builder, a collection of attributes and properties that determines how dependent data (values) are represented as chart fields, such as bars or lines.


In Project Builder, a node in the Project Navigator denoting a file stored in the file system.  For example, the global and local registry nodes correspond to global and local registry files.


The area within an object to which a fill (color or pattern) should be applied.


A PL/SQL function or anonymous function that restricts the data displayed by a group.


A computer that regulates access to computers on a local area network from outside, and regulates access to outside computers from within the local area network.


See deconstructed object.


Layout Editor mode that automatically resizes or shrinks parent objects when child objects are moved or resized, and adjusts the positions of other layout objects that might otherwise be affected by the repositioning or resizing of the objects.


The state of an entity that is able to respond to input from the user or the client.  If an entity has the keyboard focus, it can receive events when the user presses a key.  If a drawn view has the drawing focus, it can respond to client routines that affect drawing.


The black part of a pattern.  You apply color to the foreground element using the Edge Color palette.


A value or column in one table that refers to a primary key in another table.


In Report Builder, a default layout style in which labels appear to the left of fields, and each record prints on a separate logical page.


In Report Builder, a default layout style that intermixes boilerplate and fields, wrapping lines at "word" breaks.


(Field Properties)  A setting that defines the appearance of the value of a field.  For example, a format mask is used to specify the display of currency amounts and dates.


A PL/SQL function that allows you to dynamically change the formatting attributes of an object.


(Oracle Express) A type of database object that represents a stored calculation, expression, or procedure that produces a value. A formula provides a way to define and save complex or frequently used relationships within the data without resaving the data itself. Each time you use a formula, Express performs the calculation or procedure that is required to produce the value.


A user-created column that gets its data from a PL/SQL function or expression, a user exit, a SQL statement, or any combination of these.


In Graphics Builder, the part of a chart template that defines the basic structure of a chart, but does not determine the way the data is plotted.
2. In Report Builder, a layout object used to enclose other layout objects and control the formatting, frequency, and positioning of several objects simultaneously.


A PL/SQL subprogram that performs a specified sequence of actions, and then returns a value.  Can reside and execute on the client and the database server.


To save an application to a file or database in a binary format that can be executed by Runtime and Batch executables.


The Form Builder executable used to save an application to a file or database in a binary format.


A Project Builder registry that stores information common to an entire Forms Developer or Reports Developer installation.  This information is restricted to type definitions, and their associated actions and pre-defined or user-defined properties.  The use of the Global Registry is optional; its functions can be performed by individual user registries.  See also: registry, user registry.


A logical container that exists across an application.  When an application uses a global variable, the application maintains the variable until the application is exited, or until another object explicitly removes it.


To give a user access to a module.  Only a module's creator can grant its access to other users.


In Graphics Builder, the lines that separate rows and columns in the Layout Editor.


1. An object that is composed of several other objects.
2. In Report Builder, a data model object that is created automatically to contain all the columns selected by a query, or created by the user to modify the hierarchy of the data appearing in a report;  it is used primarily for creating breaks in a report, as well as for resetting computations.
3. In Project Builder, collections of related items available via submenus off the Launcher.  Groups allow users to set up the Launcher much like the Windows 95 Start menu, with arbitrary "groups" as entries that pop up to reveal other items and/or groups.  For example, a user could define a group named "Project Docs", containing a project schedule, to-do list, component specifications, etc.; some files may be .TXT files, other .DOC files.


A PL/SQL function that restricts the data fetched by a group.


A hierarchical model-similar to a "family tree"-that describes the relationships between group objects and the objects that compose them.


Acronym for graphical user interface. The use of pictures rather than just words to represent the input and output of a program.  Programs with GUIs run under a windowing system (such as  X Windows, Microsoft Windows, Apple Macintosh, and so on).  GUI programs display icons, buttons, and so on, in windows on the screen;  users control the GUI programs mainly by moving a pointer on the screen (typically controlled by a mouse).  Also known as a bitmapped interface.


An internal pointer to an application object.  In order to reference an object in a PL/SQL program unit, you must pass its handle as an argument to the appropriate subprogram.


An optional report region that can contain introductory material for the report, including text, graphics, data, and computations.  The report header appears first, before the body and trailer.


A node in the Object Navigator denoting a type of object which can be contained within or associated with a report.  Selecting a heading node does not select an object in the report.


(Field Properties)  A property that specifies whether Report Builder will suppress the indicated field at its location in the layout.  If Hidden is specified, the field's value will appear only where referenced in text objects (using &fieldname).


(Oracle Express) A means of organizing and structuring data. A hierarchy exists when values within a dimension are arranged in levels, with each level representing the aggregated total of the data from the level below. Some dimensions have multiple hierarchies based on them.

The following example shows a hierarchy based on the GEOGRAPHY dimension, in which dimension values are arranged in five levels. Data at the Customers level is aggregated into the Cities level, which, in turn, is aggregated into the Countries/Areas, Continents/Regions, and Global levels.


Acronym for Hypertext Markup Language.  A tag-based ASCII language used to specify the content and links to other documents on Web servers on the Internet.  End users with Web browsers view HTML documents and follow links to display other documents.


Acronym for Hypertext Transfer Protocol. The protocol used to carry WWW traffic between a WWW browser computer and the WWW server being accessed.


A reference (link) from some point in one document to (some point in) another document or another place in the same document.  A Web browser usually displays a hyperlink in some distinguishing way (in a different color, font or style).  When users activate hyperlinks (by clicking on them with a mouse) the browser displays the target of the link.


A collection of documents containing cross-references which, with the aid of a Web browser, allow readers to move easily from one document to another.


Cross-references which, with the aid of a Web browser, allow readers to move easily from one document to another.


Acronym for interface C definition-a PL/SQL application programming interface to functionality implemented in C.


A graphic representation of a window or tool.


A bitmapped object that can be stored and loaded into an application.  The client cannot modify an imported image.


In Project Builder, a project item, usually the result of automatic generation, that Project Builder recognizes and for which it automatically creates entries in the Project Navigator.  For example, Project Builder can recognize .OBJ files, generated as an intermediate step during the compilation of C source files, and create entries for them in the Project Navigator.  Although resetting the properties of an implied item is of limited use (the next compilation will destroy changes) such items can be useful, as they can be examined via actions such as Edit, View, and Print.  See also: item, action.


1. To read a module from the file system or database, and incorporate it into an application.
2. To read in a file containing project information.


A piece of data that does not depend on other data for its value.  For example, an employee's name may have the value Jones, which is independent of the values of other employee's names or associated data.  Also called category data.


An optional structure associated with a table that is used by Oracle Server to locate rows of the table quickly, and (optionally) to guarantee that every row is unique.


In Project Builder, to obtain information for an action, type, macro, or property definition from an ancestor node in the dependency tree.  If related attributes exist in an ancestor node, they may be inherited.  Thus, filesystem items like forms and documents may inherit action definitions from subprojects, projects, the user registry, or the Global Registry; projects may inherit type definitions from the local or the Global Registry; and so on.


The virtual rectangle that constitutes an object's ideal shape and connects its four control points, regardless of edge thickness or other attribute settings.


The file used to build a target: for instance, an .FMB is the input for an .FMX.  Also called source.


A mode in which each character you enter is inserted at the cursor, pushing the following characters to the right.  The opposite of replace mode.


A worldwide TCP/IP-based network of computers.


A file containing any mixture of PL/SQL source, Procedure Builder commands, and SQL statements.


An internal TCP/IP network, access to which is restricted (via a firewall) to individuals inside the company or organization.  An intranet provides similar services within an organization to those provided by the Internet, but is not necessarily connected to the Internet.  A common example of an intranet is when a company sets up one or more Web servers on an internal network for distribution of information or applications within the company.


A four-part number with no more than three digits in each part that uniquely identifies a computer on the Internet.


In Project Builder, an object in the file system associated with the project, such as a form or a document, pointed to or represented by a node in the Project Navigator.


In Project Builder, an entry in the Project Navigator window, consisting of an icon and a descriptive title.  Nodes point to actual items in the filesystem, such as Form Builder files and documents.  See also: node, item.


Acronym for Java ARchive.  A file used for aggregating many files (Java class files, images, and so on)  into one file.


A computer language that supports programming for the Internet in the form of platform-independent "applets".


Combining data from two (or more) tables in a single SELECT statement.


  See alignment.


1. Part of a command line syntax that must be supplied with a corresponding argument.  2. A required part of a PL/SQL construct.


Text identifying the values or meaning of an application's visual objects.


(Oracle Express) A position in a dimension hierarchy. Each level above the base level represents the aggregated total of the data from the level below. For example, the TIME dimension might have ascending levels such as Month, Quarter, and Year. Within a dimension hierarchy, a dimension value at one level has a family relationship with the dimension values at the levels above and below that level.


(Oracle Express) A Selector dialog box tool that allows the user to select dimension values based on their level in a particular hierarchy. For example, the user can select all of the dimension values at the Key Account level in the Geography dimension.


The area of an editor in which you can create, modify, position, or delete objects.


A unit of measurement for ensuring a consistent measurement system across different display devices.  Used to specify a position on the layout, or the dimensions of an object.


A reference to a parameter used to represent a string of text in a SQL SELECT statement.  For a lexical reference, you must precede the parameter name with an ampersand (&).


A collection of one or more PL/SQL program units that are stored together in a file on the client file system or in the database.  Program units stored in a library can be referenced by several applications at once.  Unlike stored program units, which reside and execute in the database, program units in libraries always load and execute within the PL/SQL engine on the client side.  To reference program units that are stored in a library, you must first attach the library.  See also:  attached library.


A data model object used to define a master/detail (parent-child) relationship between a group and a query.


The name of a file to which a boilerplate object is associated.  At runtime, Report Builder imports the file's contents into your report layout.


A list of items within a dialog box.  Usually, the list box offers choices for selection, and it is scrollable.


In Form Builder, an item that displays a list of choices.


Also called LOV. A scrollable popup window that provides the user with a single or multi-column selection list.


(Oracle Express) A Selector dialog box tool that allows you to select dimension values from a list of the currently selected values in the dimension.


1. The database on the computer running the application.  2. The database to which an application is connected.  This database parses and executes all SQL statements generated by the application.


See user registry.


A PL/SQL variable declared only within the scope of the current program unit.


(Oracle Express)

Not	Unary Not -- Operand can be integer or long. The operation is performed bitwise (one's complement).

And	And -- Operands can be integer or long. The operation is performed bitwise.

Or	Inclusive Or -- Operands can be integer or long. The operation is performed bitwise.

Xor	Exclusive Or -- Operands can be integer or long. The operation is performed bitwise.

Eqv	Equivalence -- Operands can be integer or long. The operation is performed bitwise. (A Eqv B) is the same as (Not (A Xor B)).

Imp	Implication -- Operands can be integer or long. The operation is performed bitwise. (A Imp B) is the same as ((Not A) OR B).


One page of your actual report (it may be displayed on one or more physical pages).


In a PL/SQL subprogram, a conditional statement that is repeated until the condition is no longer met.


In Project Builder, a type-specific variable that may be used to customize and extend actions.  A macro may be either a constant or a simple expression (which, in turn, may contain other constants and/or expressions).  The use of macros adds great flexibility in issuing command options, and in allowing the user to modify sets of commands by changing one property definition.


A default layout that displays records in one or more columns on the page.  Fields appear directly beneath each other in a single repeating frame.


An optional report region that appears at the top and bottom of each logical page in the body region.  The margin may include any layout object, but typically contains boilerplate and fields (for page numbers, page totals, grand totals, and current date and time).


A default layout in which the detail records appear below the master records.  Master records appear in form layout style, while detail records appear in tabular layout style.


(Oracle Express) A Selector dialog box tool that allows the user to select dimension values by matching characters in dimension value names to characters that the user specifies. For example, the user can select all dimension values in the Product dimension at the Brand level that contain the characters "new."


A repeat direction that displays each record of a repeating frame as a cell of a matrix.


A default layout, resembling a grid, that formats the four sets of data necessary for a matrix report; one set of data displays as a row of labels, one as a column of labels, one set creates the grid, and one set fills the cells of the grid.


A cross-tabulation of four sets of data:  one set of data displays across the page; one set of data displays down the page; one set of data is the cross-product, determining all possible locations in which the across and down data relate and placing a cell in those locations; and one set of data displays as the "filler" of the cells.


(Oracle Express) Data that can be examined and analyzed, such as sales or cost data. You can select and display the data in a measure. Measures can be stored as variables or relations, or measures can be calculated by means of formulas.


A unit of memory equal to 1,048,576 bytes (1024 x 1024). Often rounded to one million bytes.


A modal window that notifies you of a condition that occurred because of your last action.  You must respond to a message box.


Executable code attached to an Oracle8 object through its object type definition.


A window that elicits a response from the operator before the application can continue.


An unrestricted window that can have as much functionality as the runtime window manager can support.


1. An object that can be shared by multiple applications.  External queries and PL/SQL libraries are examples of modules.  2. In Form Builder, a major component of an application (i.e., a menu module).


A field in a window or dialog that extends for several lines, allowing you to scroll vertically through the information.


(Oracle Express) A special data value that indicates that data is "not available" (NA). NA is the value of any cell to which a specific data value has not been assigned or for which data cannot be calculated.


Matrix report in which either the across and/or down dimension contains one or more master/detail relationships.  There is no limit to the amount of nesting allowed.


A datatype indicating that the data will be fetched when the page on which it appears is formatted (instead of fetched and cached until formatted).


1.  A specific location in the Object Navigator object hierarchy.  Nodes can be expanded to reveal information about an object, such as cross references to other objects.  2.  In Project Builder, an entry in the Project Navigator.  See also:  item, item node, organization node.


A report column that references a database column of datatype NOCACHE.


The absence of a value.


(Oracle Express)

^	Exponentiation,

-,+	Unary minus and plus,

*, /	Numeric multiplication or division. For division, the result is a double.

\	Integer division. The operands can be integer or long.

Mod	Modulus or Remainder. The operands can be integer or long,

-, +	Numeric addition and subtraction. The + operator can also be used for string concatenation.


1.  An item that can be placed on the layout.  The following are examples of objects:  rectangle, line, ellipse, arc, polygon, polyline, rounded rectangle, freehand, chart, text, symbol, and text field.  2.  In Oracle8, an instance of an object type.  An object can be a row in an object table, or the portion of a row contained in a column object in a relational table.


See column object.


A container for a group of objects, used to provide the ability to copy or reference related objects.


See handle.


The window containing a hierarchical list of objects for the current session.  The list appears in outline form, and enables the user to accomplish several tasks such as creating, editing, renaming, and deleting objects.


In Oracle8, a table whose definition is based on an object type.  Each attribute in the object type becomes a column in the object table.  Each row in the table is an individual Oracle8 object.


In Oracle8, a user-supplied definition or template, upon which objects can be built.  An object type is a composite, whose parts are attributes.  Each attribute has a name and a datatype, and the object type as a whole has a name.  An object type may also include one or more methods.


Acronym for Open Database Connectivity.  A standard for accessing different database systems.  An application can submit statements to ODBC using the ODBC flavor of SQL.  ODBC then translates these to whatever flavor the database understands.  Using the Oracle Open Client Adapter (OCA), an application can access different database management systems in one consistent manner.  This allows an application developer to develop, compile, and ship an application without targeting a specific DBMS.


Object Linking and Embedding.


An application that can store and display OLE objects.


An application that creates OLE objects.


See built-in datatype.


An environment variable that indicates the root directory of Oracle products.


An entry in the Project Navigator, such as "Types", "Projects", "Form Files", etc., used to help organize the Navigator and indicate the filetypes of child items.  It may also correspond to a data structure within certain types of filesystem objects.


Represented in x and y coordinates.  The origin of a view indicates the location of the view on its parent's canvas.  The origin of a canvas indicates the position of drawing on a drawn view.


The smallest virtual rectangle that completely surrounds an object.


When an object's contents cannot fit on the current logical page.  In the event of overflow, some of the contents are moved to the next logical page.


A PL/SQL function provided with the software that can be referenced anywhere within a program unit.


A method of encapsulating and storing related procedures, functions, variables, and other package constructs together as a unit in the database or on the client.  While packages provide the database administrator or application developer organizational benefits, they also offer increased functionality and database performance.  The software provides several built-in packages which contain PL/SQL constructs that can be referenced by client-side program units (e.g., TEXT_IO package).  Several packages are also supplied with the Oracle database server for referencing by stored program units (e.g., DBMS_OUTPUT package).


Includes the actual implementation of the package, which may include private subprograms and datatypes.  The body is optional if the package consists only of declarations.


Declares the public interface to the package-that is, the datatypes and subprograms that can be referenced by other program units.


(Oracle Express) 1. A slice of data included in a report. Additional pages display additional slices of data.

The following figure shows three pages of data.

2. In Express, a page can also refer to a unit of storage in an Express database.


(Oracle Express) A representation of how data selected for a query will appear in your spreadsheet. The page layout shows three edges -- Across, Down, and Page. The edges indicate how the multi-dimensional datacube defined by the query will appear in the two-dimensional spreadsheet. Dimension tiles display the names and positions of the dimensions. A dimension tile on the Across edge indicates that this dimension will appear as a column. A dimension tile on the Down edge indicates that this dimension will appear as a row. A dimension on the Page edge indicates that this dimension will appear in a page box at the top of the results.


A setting that controls whether to move the current object and its children to the next logical page.  You can set page breaks to occur before or after the current object appears in the report output.


An interface element that displays tools, colors, or patterns available in an editor.


A distinct portion of an editor where work is performed, usually resizeable.


The number of physical pages needed to print one logical page.


1. A PL/SQL construct used to pass information to a subprogram.  For example, in the subprogram call MYPROC (x),x is a parameter.  2. In Forms Developer, parameters are used to pass information between components such as Form Builder and Graphics Builder.  3. A variable you can change at runtime.


A group of parameter names and associated values used to pass information between Forms Developer components.


1. An object that is immediately above another object in its group tree.  A group object is the parent to each of the objects that compose it.  Every object is the parent of its children.
2. (Oracle Express) A dimension value at the level immediately above a particular value in a hierarchy. The parent value is the aggregated total of the values of its children.  The following example shows the dimension value "France" as the parent of "Lyon" and "Paris" in the GEOGRAPHY dimension.


To place the contents of the Clipboard (cut or copied objects) at the current cursor location.


A graphical property you can apply to the edge or fill of most objects.


The machine code or instruction list for a compiled program unit.


Acronym for Portable Document Format.  A file format (native for Adobe Acrobat) for representing documents in a manner that is independent of the original application software, hardware, and operating system used to create the documents.  A PDF file can describe documents containing any combination of text, graphics, and images in a device-independent and resolution independent format.


The size of a page that is output by your printer.


The type of element used to plot a field on a chart, such as bar, line, or symbol.


Oracle's proprietary extension to the SQL language.  Adds procedural and other constructs to SQL that make it suitable for writing applications.


A Procedure Builder Interpreter script file.


A PL/SQL library file that contains source code and compiled code. The file can be opened in Procedure Builder for editing.


A text file that contains the PL/SQL source of a single program unit.


A runtime PL/SQL library file that contains executable code only.  The file cannot be opened in Procedure Builder for editing.


A list that pops up when the user performs a particular action.


A number that TCP uses to route transmitted data to and from a particular program.


An action shipped with Project Builder and automatically available to the user via a menu item and/or a toolbar button.  Pre-defined actions include Build, Deliver, and several source control options.  When a pre-defined action is defined for a supported file type, the action is invoked for any selected item of that type when the user calls the action from Project Builder.  See also:  action, user-defined action.


See built-in datatype.


A setting that affects the behavior of the application's interface.


(Oracle Express) View the script that would be generated if you accept the current criteria. In the dialog box for any Selector tool you can preview your selection by choosing the Preview button.


The interface with which you view and scroll through report output online.


A column in a database table whose members consist of unique values that can be used to identify a row in a table.


See built-in datatype.


In a printer definition file, an escape sequence to which you assign a printer code that can be referenced in a report.


A file that contains a printer definition in text (e.g., ASCII or EBCDIC) format.


A PL/SQL subprogram that performs a specified sequence of actions. .  Can reside and execute on the client and the database server.


A PL/SQL code structure that can be independently recognized and processed by the PL/SQL compiler.  Anonymous blocks, subprogram specifications and bodies (procedures and functions), and package specifications and bodies are types of program units.  Program units can reside and execute on the client and the database server.  See also:  stored program unit.


The basic data structure created by Project Builder.  Projects are collections of pointers to all the files you consider part of your application, or otherwise want to group together conceptually.  You can define the editors, compilers, and other tools you use to work with the items contained within a project.  All project information is stored within a project registry.  See also:  project item, project file, export.


In Project Builder, project files are all the files associated with an application.  Project files can be of any type, including forms, reports, displays, 3GL modules, documentation, and test scripts. See also:  project, project item.


In Project Builder, anything for which properties may be defined, including all entities stored under the Projects node, types, actions, and macros. See also: project, project file.


The window containing a hierarchical list of project items for the current session.  The list appears in outline form, and enables the user to accomplish several tasks such as creating, editing, renaming, and deleting objects.  Although only one is visible at any time, the user can choose from two different schema by which to organize the objects.


The top-level node for a project.  It represents or points to the project file.  See also: project, project file.


In Project Builder, the file that stores all the information associated with a project:  files belonging to the project, types, actions, and macros defined for the project, and so on.


The project view shows objects organized by their type, and by their project/subproject relationships.  The projects are organized alphabetically by project file, then alphabetically by category.  See also:  dependency view, project, project file, view.


A dialog that assists the user in accomplishing the steps necessary to create a new project or sub project.


A characteristic of an object that determines the behavior or appearance of that object.


A named object that contains a list of properties and their settings used to globally control the appearance and functionality of objects based on that class.


A string you can enter when connecting to a database or server that allows you to connect to a remote database or server.


(Oracle Express) When you select values for one of the dimensions in a measure, the other dimensions that make up that measure are known as qualifying dimensions.

Suppose your Sales measure is dimensioned by Product, Month, and Geography. If you select the top ten cities based on Sales, you must also specify which product and month you want to consider when you compare Sales values. In this case, Product and Month are the qualifying dimensions.


A SQL SELECT statement that specifies the data you wish to retrieve from one or more tables or views of a database.


A PL/SQL function that, when executed, filters data retrieved by a query.  Only the data that meet the conditions in the function are charted.


An option that terminates the current session and returns the user to the operating system.  On some systems, Quit is Exit.


A control (similar to a check box), appearing in sets of two or more, only one of which may be either "on" or "off" at any given time.


A set of two or more radio buttons, only one of which may be either "on" or "off" at any given time.


(Oracle Express) A Selector dialog box tool that allows the user to select consecutive time periods as dimension values. These time periods can be based on any of the following:

•	A specific number of the most recent time periods

•	A beginning time period and a most recent time period

•	A beginning and ending time period

For example, the user can select dimension values for the range from the week ending November 25, 1996 through the week ending December 30, 1996.


A cipher designed by RSA Data Security, Inc. which can accept keys of arbitrary length, and is essentially a pseudo random number generator with the output of the generator being XORed with the data stream to produce the encrypted data.  For this reason, it is very important that the same RC4 key never be used to encrypt two different data streams.


Acronym for Relational Database Management System.  A database that allows the definition of data structures, storage and retrieval operations, and integrity constraints.  In such a database, data and relations between them are organized in tables.


A file that contains a single report definition in binary format.  .RDF files are used to both run and edit reports.


A file that contains a single report definition in binary format.  .rep files are used solely to run reports; you cannot edit a .rep file.


The ability to query the data throughout a database as of a single point in time.


One row fetched by a SQL SELECT statement.


An internal data structure object with a column/row framework, that belong to the form module in which they are defined.


A type of column that points to data in other column objects or object tables (Oracle8).


A line that appears at a specified value on a chart.


(Oracle Express) Fetch the most recent data from an Express database after query results are displayed in your report. When you open a saved Express query, the results are refreshed automatically.


To add the definition of a type or a new project to either the global or local registry.  Upon being registered, a new type can have actions defined for it, while a new project can have its referenced files identified as specific types, so that actions can be invoked against them.  See also:  registry.


A global and/or user-specific configuration file used to store project definitions and environment information.  See also:  Global Registry, user registry.


A symbol used in search criteria to indicate a comparison between two values, such as the equal sign in "WHERE DEPTNO = 10." Rows in which the comparison results in "true" are returned in the result (fetched), while rows in which the comparison returns "false" are rejected from the result.


A database on a computer other than the local database.  Usually a computer on the same network, but at a different node (i.e., a database that you use through a database link).


A layout object used to display rows of data that are fetched for a group.


A mode in which each character you type replaces the current character at the cursor.  The opposite of insert mode.


The objects that are used to define a report's data model and layout.  Report-level objects are assigned to a single report, and cannot be shared by other reports or other Oracle products. Objects include reports, queries, external queries, external PL/SQL libraries, groups, columns, parameters, links, frames, repeating frames, fields, boilerplate, and anchors.


Available on Windows NT and Windows 95 only, waits for any command lines to run a report, then places that report in its queue to run in the background on the local server.  Typically command lines are received from Form Builder or Graphics Builder via RUN_PRODUCT, or from another report via SRW.RUN_REPORT.  You can also use RWISV60 to submit a report to the Reports Background Engine.


Maintains timestamp and status information about reports managed by the Reports Server.


Available on Windows NT, Windows 95, and UNIX, enables running reports on a remote server.  Queues job requests and allows you to schedule when to run reports.  Use RWCLI60 to send a report to the Reports Server.


Provides an interface between your Web Server and Reports Runtime, enabling you to run reports dynamically from your Web browser.


Provides a connection between a Web Server and the Reports Server.


A file that contains a report definition stored in text (e.g., ASCII or EBCDIC) format.  .REX files are used to port reports from one platform to another. Note that .REX files are no longer required. They are available for backward compatibility.


Refers to the intensities of the red, green, and blue components of a color.


The group object to which all other objects in an application belong.


Top-level node for a project representing user's environment.  May correspond to the user registry or the Global Registry, depending on which registry has been chosen to set defaults.


1. One set of field values in a table; for example, the fields representing one employee in the example table EMP.  2.  To generate a runtime version of an application.


An object in an Oracle8 object table.  Each row in the table is an object.  However, in Forms Developer an object table is deconstructed into individual columns, so that the row object no longer exists as a single entity (only as its separate attributes).


To execute a runtime version of an application or program unit.


Acronym for Rich Text Format.  A non-platform-specific file format based on control words used to represent unformatted text and images in various applications and operating systems.  RTF uses the ANSI, PC-8, Macintosh, or IBM PC character set to control the representation and formatting of a document, both on the screen and in print.


See rep file.


The interface in which users view and interact with a runtime application.


A screen or window appearing optionally at runtime in which a user can modify print options and parameters prior to report execution.


(Oracle Express) A set of dimension values that has been saved either as a list of values or as a script. You can save selections that you build, or your database administrator can create saved selections and make them available to you.

Saved selections are a time-saving feature: each time that you need to re-use a selection, you can simply retrieve a saved selection without having to recreate it.


(Oracle Express) A Selector tool that allows you to retrieve a selection of dimension values that has been saved.


A collection of related database objects, usually grouped by database userid.  Schema objects includes tables, views, sequences, stored program units, synonyms, indexes, clusters, and database links.


The level at, or range in which, an object operates.  For Project Builder:  1.  Describes the range of files affected by Compile and Compile All commands invoked against compilable project items.  2:  Describes the range of files influenced by inheritable definitions.


See SQL script, Interpreter script.


In Report Builder, one of multiple layouts in the same report, each with a different target audience, output format, page layout, page size, or orientation.  For example, a single report can include an executive summary for senior management in one section and also a detailed breakdown for  individual managers in another section.


A SQL statement that specifies which rows and columns to fetch from one or more tables or views.


(Oracle Express) The set of dimension values currently chosen for a dimension, or the script that contains conditions or criteria to specify those values.


(Oracle Express) As shown on various dialog boxes in the Selector, a description of the choices that a user has made in selecting dimension values. It is a translation, in ordinary language, of the Express Language script.


(Oracle Express) A set of tools that you use to choose the dimension values to include, for instance, in a report, table, graph, or dimension list box. For example, you can use the Selector to choose the top 10 cities based on Sales or those cities whose Sales exceeded Quota by 15 percent. The Selector also allows you to sort dimension values and to create and retrieve saved selections.


(Oracle Express) A dialog box or group of dialog boxes that provides a particular way of selecting or sorting dimension values. Each Selector tool is part of the Selector. You can use Selector tools to select dimension values based on their level in the hierarchy, their attributes, the characters in the value name, and so on. You can also use Selector tools to sort the dimension values.


The period between invoking and quitting the executable.


One of two or more objects that have the same parent object in its group tree.  All objects that belong to one group object are siblings.


The combination of an IP address and a port number.


(Oracle Express) A Selector dialog box tool that allows you to rearrange the order of dimension values in a displayed selection. You can sort a selection in ascending or descending order by the following:

•	Alphabet

•	Order in the database

•	Data value

•	Order or level in the hierarchy

•	Time period

You can also sort a selection manually, by dragging and dropping dimension values.


In PL/SQL:  Statements provided in a subprogram or package.  You must have the source code for a program unit before you can compile it into executable form.  In Project Builder:  The input types required to build target types.


Defines only the names, parameters, and return type (applies to functions only) of the subprogram.


A small rectangle at the bottom of the vertical scrollbar and to the left of the horizontal scrollbar in an editor.  Dragging and releasing the mouse button creates a new pane, and divides the scroll bar into separate scroll bars for each pane.


A standard interface for storing and retrieving information in a relational database.  SQL is an acronym for Structured Query Language.


A that contains a query stored in text (e.g., ASCII or EBCDIC) format.


A file containing SQL statements that you can run to perform database administration quickly and easily.  Several SQL scripts are shipped with Oracle products.


A SQL instruction to Oracle.  A SELECT statement is one type of SQL statement.


See call stack.


A PL/SQL construct used for conditional, iterative, and sequential control, and for error handling.  A semi-colon (;) must terminate every PL/SQL statement.


(Oracle Express) A saved selection that contains the same dimension values every time it is evaluated. Static saved selections list the dimension values that are to be selected, rather than the selection criteria. For example, a static saved selection script might include "Select February 1996, March 1996, and April 1996", while the script for a dynamic saved selection might have "Select the last three Months".


A procedure, function, or package that resides and executes in the Oracle database server.


A procedure or function that resides and executes in the Oracle database server.


HTML extensions that provide powerful formatting flexibility in HTML documents.  To view an HTML document that takes advantage of style sheets, display it in a browser that supports style sheets.


A PL/SQL procedure or function.


In Project Builder, a project contained within another project file, rather than being stored in its own file.  See also:  project.


In Project Builder, a node denoting a subproject.  See also:  project, project node, subproject node.


A column, with a type of summary, which computes subtotals, grand totals, running totals, and other summaries of the data in a report, using one of the packaged summary functions provided by Report Builder.


The file format used by the Microsoft Excel program.


The orderly system by which commands, qualifiers, and parameters are combined to form valid command strings.


One of the variables that are provided with Reports Developer (e.g., &Logical Page, DESTYPE).


A named collection of related information, stored in a relational database or server, in a two-dimensional grid that is made up of rows and columns.


A collection type, which defines a data unit made up of an unordered set of elements, all of the same data type.  The corresponding data unit is a single column nested table, the column type of which is a built-in type or an object type.  (Oracle8)


A default layout displaying labels at the top of the page and rows of data underneath the labels.


In Project Builder, any item in the middle of the dependency tree; for example, an executable is a (compile) target for a library; while a library is a target for a group of objects; and an object is a target for a source file.


A node denoting a target.  See also: target.


Acronym for Transmission Control Protocol. The underlying communication protocol for exchanging HTTP requests between clients and Web servers.


A submenu that the user can remove from its source using a mouse or other pointing device and drag to another part of the display screen.


In Form Builder, an item that displays a character string value.


The horizontal area at the top of a window that displays the name of the application or interface element in that window.


See header.


To turn a setting alternately on or off.  For example, you can hide or show the Object Navigator.


An iconic button used to create and manipulate objects in an application.


Collection of iconic buttons that perform product commands.  Usually aligned horizontally along the top, or vertically down the side of a window.


A collection of tools.


(Oracle Express) A Selector dialog box tool that allows the user to select dimension values based on the top x, bottom y, or top x and bottom y data values. For example, the user can produce a dimension selection that contains products whose Volume Sales were among the top 10 percent of products in the Total U.S. for the four-week time period ending December 30, 1995.


A optional report region that can contain closing material for the report, including text, graphics, data, and computations.  The report trailer appears last, following the header and body.


A sequence of SQL statements treated as a single unit.


A PL/SQL procedure that is executed, or "fired," upon a specific event.


A description of a file type, such as a form, a document, etc., containing such information as type name and description. Each description applies to a single file type.  In addition, there are four meta-types: "updtext", which applies to all text files, “updproj” which applies to all project files, “updlink”, which applies to all project links, and "all" which applies to any file type.  Types are the foundation for defining actions and macros.


To change the values for table data, in particular, by altering data values using the SQL command UPDATE, but also by deleting values using the SQL command DELETE or by inserting values using the command INSERT.


Acronym for Uniform Resource Locator. The "address" used to specify a WWW server and home page.  For example:
http://www.acme.com/
which indicates that the host's address is www.acme.com. An URL most often is a filename (possibly with a long path to it and usually with an extension of .HTML, or .HTM (for PC-DOS filenames).


A way in which to pass control (and possibly arguments) from Forms Developer to another Oracle product or 3GL, and then return control (and possibly arguments) back to Forms Developer.


A custom action defined by a Project Builder user.  Such actions may apply to any single file type, or to all file types.  See also:  action, pre-defined action.


See object type.


A custom macro defined by a Project Builder user.  Such macros may be used to modify both built-in actions and user-defined actions.  See also:: macro, built-in macro, action, pre-defined action.


A project file storing configuration information on a per-user basis.  This enables users to customize their individual development environments.  The user registry inherits type information from the Global Registry, and may define new types as well as override aspects of type definitions stored in the Global Registry.  It also stores environment and preference information, such as the user's preferred connection string, UI settings such as "Display Toolbar" and certain general project information such as "Author."  See also:  registry, Global Registry.


See continuous axis.


A PL/SQL code structure that returns a value.  Value constructs include functions and expressions.


A named object that can be assigned a value and whose assigned value may change over time.


A collection type, which defines a data unit made up of an ordered set of elements, all of the same datatype.  The corresponding data unit is a varying array or VARRAY.  The number of elements in a VARRAY (size) is variable.  However, you must specify a maximum size when you declare a varying array type.


Visual Basic extension.  Used as the file extension for special dynamic link libraries distributed on files that contain predefined VBX controls.


A widget, built with the Microsoft Visual Basic language, used to enhance the user interface, obtain user input, and display output  (e.g. sliders, grids, and control knobs).


A virtual table whose rows do not actually exist in the database, but which is based on a table that is physically stored in the database.


A directory mnemonic (essentially a shortcut or synonym) that the virtual file system uses to map files stored in the file system on the host machine.


A mapping that associates the pathnames used in URL to the file system maintained by the host machine's operating system.


The font, color, and pattern properties that you set for objects that appear in your application interface.


See WWW.


A program that end users utilize to read HTML documents and programs stored on a computer (serviced by a Web server).


A program executed on a Web server via the Web Request Broker.


A server process (HTTP daemon) running at a Web site which sends out Web pages in response to HTTP requests from remote Web browsers.


A character used to mean 'any one character' or 'a contiguous set of characters' within a word or phase.


1. A rectangular area of the desktop that contains an application.  Each window has an area where you can interact with the application.  Windows can be opened, resized, moved, reduced to an icon, or enlarged to fill the entire desktop.  2. In Form Builder, an object type you can associate with a canvas view.


The file format used by some spreadsheet programs, such as SQL*Calc, or by Lotus 1-2-3 programs.


Acronym for Oracle Web Request Broker.  Provides a powerful distributed runtime environment for developing and deploying applications for the Web.  The WRB runtime platform enables application developers to write applications that are independent of, and work with a number of, Web servers.


Acronym for World Wide Web.  The network of servers on the Internet, each of which has one or more home pages, which provide information and links to other documents on that and (usually) other servers.


To expand an object to allow more room for editing the contents of the field.


The secondary toolbar docked (by default) to the left of the Project Navigator.  It provides simple organization and application launching abilities.


 the latest version of OLE controls (OCX)


XML output complying with general XML principles such as proper tagging, nesting, and the inclusion of an XML declaration, e.g. <?xml version="1.0" encoding="UTF-8"?>.


A placeholder username enables users to log on to the database using their personal username rather than the Oracle database username (e.g., $user_name@database) when running reports from a Web browser.


Extensible Markup Language -- a metalanguage using SGML to define and structure data. Report Builder supports XML output to enable Web publishing as well as electronic data exchange with third-party applications. You can also use XML to build report definitions that can be merged with other report definitions at runtime or run separately


XML output with structure and element content conforming to a document type definition (DTD). Valid XML is also well-formed.


Developer built-in packages examples

  Related Topics	   All Examples

DDE package examples

DEBUG package examples

EXEC_SQL package examples

LIST package example

OLE2 package examples

ORA_FFI package examples

ORA_NLS package examples

ORA_PROF package examples

TEXT_IO package examples

TOOL_ENV package examples

TOOL_ERR package examples

TOOL_RES package examples


DDE package examples

  Related Topics	  All Examples

DDE.App_Begin

DDE.App_End

DDE.App_Focus

DDE.Execute

DDE.Getformatnum

DDE.Getformatstr

DDE.Initiate

DDE.IsSupported

DDE.Poke

DDE.Request

DDE.Terminate


DEBUG package examples

  Related Topics	   All Examples

Debug.Break

Debug.Getx

Debug.Interpret

Debug.Setx

Debug.Suspend


EXEC_SQL package examples

  Related Topics	   All Examples

EXEC_SQL.Open_Connection

EXEC_SQL.Curr_Connection

EXEC_SQL.Default_Connection

EXEC_SQL.Open_Cursor

EXEC_SQL.Parse

EXEC_SQL.Describe_Column

EXEC_SQL.Bind_Variable

EXEC_SQL.Define_Column

EXEC_SQL.Execute

EXEC_SQL.Execute_And_Fetch

EXEC_SQL.Fetch_Rows

EXEC_SQL.More_Result_Sets

EXEC_SQL.Column_Value

EXEC_SQL.Variable_Value

EXEC_SQL.Is_Open

EXEC_SQL.Close_Cursor

EXEC_SQL.Is_Connected

EXEC_SQL.Is_OCA_Connection

EXEC_SQL.Close_Connection

EXEC_SQL.Last_Error_Position

EXEC_SQL.Last_Row_Count

EXEC_SQL.Last_SQL_Function_Code

EXEC_SQL.Last_Error_Code

EXEC_SQL.Last_Error_Mesg


LIST package examples

  Related Topics	   All Examples

List.Appenditem

List.Destroy

List.Deleteitem

List.Fail

List.Getitem

List.Insertitem

List.Listofchar

List.Make

List.Nitems

List.Prependitem


OLE2 package examples

  Related Topics	   All Examples

OLE2.Add_Arg

OLE2.Add_Arg_Obj

OLE2.Create_Arglist

OLE2.Create_Obj

OLE2.Destroy_Arglist

OLE2.Get_Char_Property

OLE2.Get_Num_Property

OLE2.Get_Obj_Property

OLE2.Invoke

OLE2.Invoke_Num

OLE2.Invoke_Char

OLE2.Invoke_Obj

OLE2.IsSupported

OLE2.Last_Exception

OLE2.List_Type

OLE2.Obj_Type

OLE2.OLE_Error

OLE2.OLE_Not_Supported

OLE2.Release_Obj

OLE2.Set_Property


ORA_FFI package examples

  Related Topics	   All Examples

Ora_Ffi.Ffi_Error

Ora_Ffi.Find_Function

Ora_Ffi.Find_Library

Ora_Ffi.Funchandletype

Ora_Ffi.Generate_Foreign

Ora_Ffi.Is_Null_Ptr

Ora_Ffi.Libhandletype

Ora_Ffi.Load_Library

Ora_Ffi.Pointertype

Ora_Ffi.Register_Function

Ora_Ffi.Register_Parameter

Ora_Ffi.Register_Return

Ora_Ffi.Unload_Library

Ora_Ffi Example 1A

Ora_Ffi Example 1B

Ora_Ffi Example 2


ORA_NLS package examples

  Related Topics	   All Examples

Ora_Nls.American

Ora_Nls.American_Date

Ora_Nls.Bad_Attribute

Ora_Nls.Get_Lang_Scalar

Ora_Nls.Get_Lang_Str

Ora_Nls.Linguistic_Collate

Ora_Nls.Linguistic_Specials

Ora_Nls.Modified_Date_Fmt

Ora_Nls.No_Item

Ora_Nls.Not_Found

Ora_Nls.Right to Left

Ora_Nls.Simple_Cs

Ora_Nls.Single_Byte


ORA_PROF package examples

  Related Topics	   All Examples

Ora_Prof.Bad_Timer

Ora_Prof.Create_Timer

Ora_Prof.Destroy_Timer

Ora_Prof.Elapsed_Time

Ora_Prof.Reset_Timer

Ora_Prof.Start_Timer

Ora_Prof.Stop_Timer


TEXT_IO package examples

  Related Topics	   All Examples

Text_IO.Fclose

Text_IO.File_Type

Text_IO.Fopen

Text_IO.Is_Open

Text_IO.Get_Line

Text_IO.New_Line

Text_IO.Put

Text_IO.Putf

Text_IO.Put_Line


TOOL_ENV package examples

  Related Topics	   All Examples

Tool_Env.Getvar


TOOL_ERR package examples

  Related Topics	   All Examples

Tool_Err.Code

Tool_Err.Encode

Tool_Err.Message

Tool_Err.Nerrors

Tool_Err.Pop

Tool_Err.Tool_Error

Tool_Err.Toperror


TOOL_RES package examples

  Related Topics	   All Examples

Tool_Res.Bad_File_Handle

Tool_Res.Buffer_Overflow

Tool_Res.File_Not_Found

Tool_Res.No_Resource

Tool_Res.Rfclose

Tool_Res.Rfhandle

Tool_Res.Rfopen

Tool_Res.Rfread


Developer built-in packages

  Related Topics 	  All Built-ins

DDE

DEBUG

EXEC_SQL

LIST

OLE2

ORA_FFI

ORA_NLS

ORA_PROF

TEXT_IO

TOOL_ENV

TOOL_ERR

TOOL_RES