Skip to main content

SqlOra

Namespace: PPJ.Runtime.Sql

Assembly: PPJ.Runtime.50 (5.0.0.0)

Provides Oracle PL/SQL execution and output-parameter sizing support.

public class SqlOra

Example:

using PPJ.Runtime.Sql;

var handle = SalSqlHandle.Null;
if (handle.Connect())
{
try
{
if (SqlOra.PLSQLPrepare(handle, "BEGIN NULL; END;"))
SqlOra.PLSQLExecute(handle);
}
finally { handle.Disconnect(); }
}

Properties​

Static member MaxArrayLength​

Int32: Gets or sets the number of elements allocated for output arrays; the initial value is 1000.

Static member MaxNonStringSize​

Int32: Gets or sets the buffer size assigned to non-string output parameters; the initial value is 64.

Static member MaxStringElementSize​

Int32: Gets or sets the buffer size of each string element in an output array; the initial value is 2000.

Static member MaxStringSize​

Int32: Gets or sets the buffer size assigned to string output parameters; the initial value is 8190.

Methods​

Static member PLSQLCommand(hSql, command)​

Adds missing bind markers, prepares an Oracle procedure call, and executes it.

ParameterTypeDescription
hSqlSalSqlHandleThe connected statement handle used for the PL/SQL operation.
commandStringThe procedure invocation with its bind expressions.

Returns: Boolean. True when execution succeeds; false when preparation returns false, or the result supplied by SQL error handling.

Static member PLSQLExecute(hSql)​

Executes the prepared PL/SQL block and copies Oracle output parameters into bind variables.

ParameterTypeDescription
hSqlSalSqlHandleThe connected statement handle used for the PL/SQL operation.

Returns: Boolean. True when execution succeeds, or the result supplied by SQL error handling.

Static member PLSQLPrepare(hSql, plsql)​

Normalizes and prepares Oracle PL/SQL text.

ParameterTypeDescription
hSqlSalSqlHandleThe connected statement handle used for the PL/SQL operation.
plsqlStringThe Oracle PL/SQL block or statement text.

Returns: Boolean. True when preparation succeeds, or the result supplied by SQL error handling.

Text not beginning with BEGIN, CREATE, or DECLARE is wrapped in a BEGIN/END block.