Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_DEBUG, 18 of 27


GET_VALUE Function

This function gets a value from the currently-running program. There are two overloaded GET_VALUE functions.

Syntax

DBMS_DEBUG.GET_VALUE (
   variable_name  IN  VARCHAR2,
   frame#         IN  BINARY_INTEGER,
   scalar_value   OUT VARCHAR2,
   format         IN  VARCHAR2 := NULL)
  RETURN BINARY_INTEGER;

Parameters

Table 9-27 GET_VALUE Function Parameters
Parameter  Description 
variable_name
 

Name of the variable or parameter. 

frame#
 

Frame in which it lives; 0 means the current procedure. 

scalar_value
 

Value. 

format
 

Optional date format to use, if meaningful. 

Returns

Table 9-28 GET_VALUE Function Returns
Return  Description 
success
 

 

error_bogus_frame
 

Frame does not exist. 

error_no_debug_info
 

Entrypoint has no debug information. 

error_no_such_object
 

variable_name does not exist in frame#. 

error_unknown_type
 

The type information in the debug information is illegible. 

error_nullvalue
 

Value is NULL

error_indexed_table
 

The object is a table, but no index was provided. 

This form of GET_VALUE is for fetching package variables. Instead of a frame#, it takes a handle, which describes the package containing the variable.

Syntax

DBMS_DEBUG.GET_VALUE (
   variable_name  IN  VARCHAR2,
   handle         IN  program_info,
   scalar_value   OUT VARCHAR2,
   format         IN  VARCHAR2 := NULL)
  RETURN BINARY_INTEGER;

Parameters

Table 9-29 GET_VALUE Function Parameters
Parameter  Description 
variable_name
 

Name of the variable or parameter. 

handle
 

Description of the package containing the variable. 

scalar_value
 

Value. 

format
 

Optional date format to use, if meaningful. 

Returns

Table 9-30 GET_VALUE Function Returns
Return  Description 
error_no_such_object
 

Either:

- Package does not exist.

- Package is not instantiated.

- User does not have privileges to debug the package.

- Object does not exist in the package. 

error_indexed_table
 

The object is a table, but no index was provided. 

Example

This example illustrates how to get the value with a given package PACK in schema SCOTT, containing variable VAR:

DECLARE
   handle     dbms_debug.program_info;
   resultbuf  VARCHAR2(500);
   retval     BINARY_INTEGER;
BEGIN
   handle.Owner     := 'SCOTT';
   handle.Name      := 'PACK';
   handle.namespace := dbms_debug.namespace_pkgspec_or_toplevel;
   retval           := dbms_debug.get_value('VAR', handle, resultbuf, NULL);
END;

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback