MinimumSize Property Example

The following example assumes a PLSQL procedure EmployeeLong that returns a long ename of approximately 200 characters.

Sub Form_Load ()

' Declare variables as OLE Objects.

Dim OraSession As Object

Dim OraDatabase As Object

Dim OraDynaset As Object

' Create the OraSession Object.

Set OraSession = CreateObject("OracleInProcServer.XOraSession")

' Create the OraDatabase Object.

Set OraDatabase = OraSession.OpenDatabase("ExampleDb", "scott/tiger", 0&)

' Add EMPNO as an Input/Output parameter and set its initial value.

OraDatabase.Parameters.Add "EMPNO", 9999, ORAPARM_INPUT

' Add ENAME as an Output parameter and set its initial value.

OraDatabase.Parameters.Add "ENAME_LONG", "foo", ORAPARM_OUTPUT

OraDatabase.Parameters("ENAME_LONG").MinimumSize = 201 'Since we require to hold a value of more than 128 bytes

' Execute the Stored Procedure Employee.GetEmpName to retrieve ENAME_LONG.

OraDatabase.ExecuteSQL ("Begin EmployeeLong.GetEmpName (:EMPNO, :ENAME); end;")

Contents