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_HS_PASSTHROUGH, 2 of 15


BIND_VARIABLE Procedure

This procedure binds an IN variable positionally with a PL/SQL program variable.

Syntax

DBMS_HS_PASSTHROUGH.BIND_VARIABLE (
   c      IN BINARY_INTEGER NOT NULL,
   pos    IN BINARY_INTEGER NOT NULL,
   val    IN <dty>,
   name   IN VARCHAR2);

Where <dty> is either DATE, NUMBER, or VARCHAR2

See Also:

To bind RAW variables use BIND_VARIABLE_RAW Procedure

Parameters

Table 17-2 BIND_VARIABLE Procedure Parameters
Parameter  Description 
c
 

Cursor associated with the pass-through SQL statement. Cursor must be opened and parsed using the routines OPEN_CURSOR and PARSE respectively.  

pos
 

Position of the bind variable in the SQL statement: Starts at 1. 

val
 

Value that must be passed to the bind variable name. 

name
 

(Optional) Name of the bind variable.

For example, in SELECT * FROM emp WHERE ename=:ename, the position of the bind variable :ename is 1, the name is :ename. This parameter can be used if the non-Oracle system supports "named binds" instead of positional binds. Passing the position is still required. 

Exceptions

Table 17-3 BIND_VARIABLE Procedure Exceptions
Exception  Description 
ORA-28550
 

The cursor passed is invalid. 

ORA-28552
 

Procedure is not run in right order. (Did you first open the cursor and parse the SQL statement?) 

ORA-28553
 

The position of the bind variable is out of range. 

ORA-28555
 

A NULL value was passed for a NOT NULL parameter. 

Pragmas

Purity level defined: WNDS, RNDS 

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