まだ完了していない非同期プロセスを取り消します。
構文
EsbCancelProcess ( hCtx ) ByVal hCtx As Long
パラメータ | 説明 |
---|---|
hCtx |
VB APIコンテキスト・ハンドル。 |
備考
この関数を使用してプロセスを取り消した場合、一部のデータのみ再計算され、一貫性が失われた状態のままデータベースが残ることがあります。
非同期データベース操作(たとえば計算)が正しく開始された後以外にこの関数を呼び出すと、エラーが発生します。
戻り値
なし。
アクセス
この関数を使用するのに、特別な権限は必要ありません。
例
Declare Function EsbCancelProcess Lib "ESBAPIN" (ByVal hCtx As Long) As Long Sub ESB_CancelProcess () Dim sts As Long Dim CalcScript As String Dim Calculate As Integer Dim ProcState As ESB_PROCSTATE_T Dim Items As Integer CalcScript = "CALC ALL;" Calculate = ESB_YES '*********** ' Begin Calc '*********** sts = EsbBeginCalc (hCtx, Calculate) '*********************** ' Send Calc script ' It is possible to send ' more than one string '*********************** sts = EsbSendString (hCtx, CalcScript) '********* ' End Calc '********* sts = EsbEndCalc (hCtx) '************************************ ' Check process state and cancel it if ' it takes too long '************************************ sts = EsbGetProcessState (hCtx, ProcState) Items = 1 Do While ProcState.State = ESB_STATE_INPROGRESS Items = Items + 1 If Items = 1000 Then '*************** ' Cancel process '*************** sts = EsbCancelProcess (hCtx) End If Exit Do sts = EsbGetProcessState (hCtx, ProcState) Loop End Sub
関連トピック