Este es el sitio web histórico de la documentación de 4D. La documentación se está trasladando progresivamente a developer.4d.com

Inicio

 
4D v20
Closing a connection

Closing a connection  


 

 

Here we use the OCIHandleFree command to free the handles, and then close the session. When handles are structured hierarchically, closing the parent handle also closes its related handles.

The code below is used to disconnect from the Oracle server. We could also use the OCILogoff command instead.

OCISessionEnd deletes the session.
OCIServerDetach deletes the path to the Oracle server.

After this, we can free the handles one by one, or just free the environment handles, which in turn will release the other handles.

Ejemplo  

Source code for OCI_DISCONNECT project method:

  //Method: DISCONNECT
  //Method call: DISCONNECT
  //Use: disconnects the currently-connected user
 
 C_LONGINT($status//return of OCI commands
 
 $status:=OCISessionEnd(svchp;errhp;authp) //deletion of user session
 $status:=OCIServerDetach(srvhp;errhp) //deletion of access to data source
 $status:=OCIHandleFree(envhp) //frees the environment handle
  //which in turn frees up all the other handles

 
PROPIEDADES 

Producto: 4D
Tema: Ejemplos de uso

 
CONTENIDO DE LA PÁGINA 
 
HISTORIA 

 
ARTICLE USAGE

4D for OCI ( 4D v20)