SqlOra
Namespace: PPJ.Runtime.Sql
Assembly: PPJ.Web.50 (5.0.0.0)
Provides Oracle PL/SQL execution and output-parameter sizing support.
- C#
- VB.NET
public class SqlOra
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
MaxArrayLength
Int32: Gets or sets the number of elements allocated for output arrays; the initial value is 1000.
MaxNonStringSize
Int32: Gets or sets the buffer size assigned to non-string output parameters; the initial value is 64.
MaxStringElementSize
Int32: Gets or sets the buffer size of each string element in an output array; the initial value is 2000.
MaxStringSize
Int32: Gets or sets the buffer size assigned to string output parameters; the initial value is 8190.
Methods
PLSQLCommand(hSql, command)
Adds missing bind markers, prepares an Oracle procedure call, and executes it.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | The connected statement handle used for the PL/SQL operation. |
| command | String | The 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.
PLSQLExecute(hSql)
Executes the prepared PL/SQL block and copies Oracle output parameters into bind variables.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | The connected statement handle used for the PL/SQL operation. |
Returns: Boolean. True when execution succeeds, or the result supplied by SQL error handling.
PLSQLPrepare(hSql, plsql)
Normalizes and prepares Oracle PL/SQL text.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | The connected statement handle used for the PL/SQL operation. |
| plsql | String | The 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.