Canceling a Non-Blocking Operation
You can cancel a non-blocking operation that is underway by calling the Cancel method on the OraSqlStmt that is executing the asynchronous call.
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
if stat = ORASQL_STILL_EXECUTING MsgBox "Cancelling the asynchronous operation that is underway" OraStmt.Cancel End if
You can cancel a non-blocking operation that is underway by calling the Cancel method on the OraSqlStmt that is executing the asynchronous call.
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
if stat = ORASQL_STILL_EXECUTING MsgBox "Cancelling the asynchronous operation that is underway" OraStmt.Cancel End if
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货