Rockwell-automation FactoryTalk Transaction Manager User Guide Manual do Utilizador Página 155

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 186
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 154
B FactoryTalk Transaction Manager and Microsoft COM+ Objects
155
ctxObject.SetComplete ‘Required
Exit Function
errorhandler:
Get_VB_Sample_Data = 33999
ctxObject.SetAbort ‘Required
Err.Raise vbObjectError, "Error in Get_VB_Sample_Data ",
_
Err.Description
Exit Function
‘ Program Notes:
‘ Note the use of SetComplete and SetAbort methods
‘ of the ctxObject to end the code. SetComplete and
‘ SetAbort indicate to the transaction server to
‘ deactivate the object and whether to commit changes
‘ made by the business code (SetComplete) or throw
‘ away all changes (SetAbort)
‘ The purpose of the arguments (strKeyID bolData) of
‘ the Get_VB_Sample_Data function is to demonstrate
‘ how to pass data to and from the function. The
‘ strKeyID variable will show a required input, notice
‘ the ByVal keyword. The remaining variables will show
optional variables returned by the function, notice
‘ the Optional and ByRef keywords.
End Function
Code Sample B (ClientSampleVB)
The following code is referenced in the ―Moving the client sample
application‖ procedure.
Option Explicit
Private Sub Command1_Click()
Dim obj As Object
Dim szKey As String
Dim szString As String
‘ Create an instance of the remote component
Vista de página 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 185 186

Comentários a estes Manuais

Sem comentários