Rockwell-automation FactoryTalk Transaction Manager User Guide Manuel d'utilisateur Page 155

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 186
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 154
1 2 ... 150 151 152 153 154 155 156 157 158 159 160 ... 185 186

Commentaires sur ces manuels

Pas de commentaire