Oracle® Objects for OLE Developer's Guide 11g Release 2 (11.2) for Microsoft Windows Part Number E17727-03 |
|
|
PDF · Mobi · ePub |
Deprecated.
For information on how to perform these tasks, see "Returning PL/SQL Cursor Variables".
Creates a dynaset from a PL/SQL cursor using custom cache and fetch parameters. The SQL statement should be a stored procedure or anonymous block. The resulting dynaset is read-only. Attempting to set the SQL property results in an error. The dynaset can be refreshed with new parameters.
set OraDynaset = CreatePlsqlCustomDynaset(SQLStatement, CursorName, options, slicesize, perblock, blocks, FetchLimit, FetchSize)
The arguments for the method are:
Arguments | Description |
---|---|
SQLStatement |
Any valid Oracle PL/SQL stored procedure or anonymous block. |
CursorName |
Name of the cursor created in the PL/SQL stored procedure. |
options |
A bit flag indicating the status of any optional states of the dynaset. You can combine one or more options by adding their respective values. |
slicesize |
Cache slice size. |
perblock |
Cache slices for each block. |
blocks |
Cache maximum number of blocks. |
FetchLimit |
Fetch array size. |
FetchSize |
Fetch array buffer size. |
The options flag values are:
Constant | Value | Description |
---|---|---|
ORADYN_DEFAULT |
&H0& |
Accept the default behavior. |
ORADYN_NO_AUTOBIND |
&H1& |
Do not perform automatic binding of database parameters. |
ORADYN_NO_BLANKSTRIP |
&H2& |
Do not remove trailing blanks from character string data retrieved from the database. |
ORADYN_NOCACHE |
&H8& |
Do not create a local dynaset data cache. Without the local cache, previous rows within a dynaset are unavailable; however, increased performance results during retrieval of data from the database (move operations) and from the rows (field operations). Use this option in applications that make single passes through the rows of a dynaset for increased performance and decreased resource use. |
ORADYN_NO_MOVEFIRST |
&H40& |
Do not force a MoveFirst when the dynaset is created. BOF and EOF are both true. |
These values can be found in the oraconst.txt
file.
The SQL statement must be a PL/SQL stored procedure with BEGIN
and END
around the call, as if it were executed as an anonymous PL/SQL block; otherwise, an error is returned. The CursorName
argument should exactly match the cursor created inside the stored procedure or anonymous PL/SQL block; otherwise an error is returned. The cursor created inside the stored procedure should represent a valid SQL SELECT
statement.
You do not need to bind the PL/SQL cursor variable using the OraParameters
Add
method if the stored procedure returns a cursor as an output parameter. You can still use PL/SQL bind variables in conjunction with the OraParameters
collection.
This method automatically moves to the first row of the created dynaset.
Specifying ORADYN_READONLY
, ORADYN_ORAMODE
, ORADYN_NO_REFETCH
, ORADYN_DIRTY_WRITE
options have no effect on the dynaset creation.
See Also: