Oracle Objects for OLE
Release 9.0.1

Part Number A90173-01

Home

Book List

Contents

Master Index

Feedback

Checking the Status of a Non-Blocking Operation

To determine the status of an OraSQLStmt executing asynchronously, applications need to poll on the NonBlockingState Property. NonBlockingState will return ORASQL_STILL_EXECUTING if execution is still pending or ORASQL_SUCCESS if execution has completed successfully.

Any failures are thrown as exceptions.

On successful completion, the output parameters, if any, are placed in the bound parameter buffers. The application can then access the parameters as in the blocking case.

The following example demonstrates the usage of NonBlockingState.

Dim OraDatabase as OraDatabase

Dim OraStmt as OraSQLStmt

Dim stat as long

Dim OraSess as OraSession

Set OraSess = CreateObject("OracleInProcServer.XOraSession")

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

'execute the select statement with NONBLOCKING mode on

set OraStmt = OraDatabase.CreateSQL ("update emp set sal = sal + 1000", ORASQL_NONBLK)

'Check if the call has completed

stat = OraStmt.NonBlockingState

while stat = ORASQL_STILL_EXECUTING

MsgBox "Asynchronous Operation under progress"

stat = OraStmt.NonBlockingState

wend

MsgBox "Asynchronous Operation completed successfully"


 
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents