Open (TbpConnection)

De Wiki1000
(Différences entre les versions)
(Page créée avec « <source lang='delphi'>function Open:Integer;</source> Cette méthode ouvre la session sur le serveur de processus métiers. {|class="wikitable" |- !Paramètre !Usage |- ... »)
 
Ligne 18 : Ligne 18 :
 
* <>0
 
* <>0
 
: La connexion à échouée
 
: La connexion à échouée
 +
 +
{|class="wikitable"
 +
|-
 +
!Code
 +
!Raison
 +
|-
 +
|1
 +
|Engine not found
 +
|-
 +
|2
 +
|Host not found
 +
|-
 +
|3
 +
|Cmd not supported
 +
|-
 +
|4
 +
|Not exists
 +
|-
 +
|5
 +
|Process not found
 +
|-
 +
|6
 +
|Local host not found
 +
|-
 +
|7
 +
|Host not running
 +
|-
 +
|8
 +
|Exception
 +
|-
 +
|9
 +
|Connect failed
 +
|}
  
  

Version du 26 mars 2018 à 10:24

function Open:Integer;

Cette méthode ouvre la session sur le serveur de processus métiers.

Paramètre Usage
Result Valeur de retour de la fonction

Valeur de retour :

  • 0
La connexion à réussi
  • <>0
La connexion à échouée
Code Raison
1 Engine not found
2 Host not found
3 Cmd not supported
4 Not exists
5 Process not found
6 Local host not found
7 Host not running
8 Exception
9 Connect failed


Exemple :

//Procedure EngineInfo;
var bpc:TbpConnection; rslt:integer; doc:TxmlDocument; S:string;
begin
  bpc := TbpConnection.Create;
  bpc.HostName := 'pc100xxx';
  bpc.HostServiceName := 'syfre';
  bpc.UserName := 'syfre';
  bpc.Password := 'syfre';
  rslt := bpc.Open;
  if rslt<>0 then
   begin
     showMessage(Format('Connect Failed :%d',[rslt]));
     exit;
   end;
 
  rslt := bpc.EngineInfo('syfre1',doc);
  if rslt=0 then
     begin
       if Assigned(doc)
          then S := doc.SaveToString
          else S := 'doc not set';
       showMessage(Format('OK: %s',[S]));
     end
     else showMessage(Format('Failed :%d',[rslt]));
 
  Result := FALSE;
end;

TbpConnection (class)Développement DSM





Whos here now:   Members 0   Guests 0   Bots & Crawlers 1
 
Outils personnels