Date: Thu, 28 Mar 2024 15:03:57 +0100 (CET) Message-ID: <134316323.111102.1711634637404@srvdoc.doc.ipesoft.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_111101_1467003524.1711634637404" ------=_Part_111101_1467003524.1711634637404 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
A transfer of handle to database connection between ESL scripts may be d= one by RPC procedures. In declaration of RPC procedure, you have to tag the= parameter that represents the handle to database connection by enumerated = type DB_HANDLE. An algorithm is contingent on the existence of datab= ase connection. If handle to database connection is an invalid value or it = points to missing database connection, the algorithm ends with error.
The enumerated type DB_HANDLE is INT.
RPC procedure declaration:
RPC PROCEDURE ProcName [([I= N] DB_HANDLE _db_handle[,_db_handle2, ...] [IN] DB_HANDLE _db_handle3]...)= ]=20 ;actions =20 END ProcName
_db_handle that can be transferred between ESL scripts is created= by these actions: DB_CONNECT, PG_DISCONNECT, SQL_CONNECT, DB_TRANS_OPEN.
Notes:
INT _db_handle =20 _db_handle :=3D 5 =20 CALL [objIdent] INSERT (_db_handle) ON procIdent
****************** =20 ; ESL script that is called RPC PROCEDURE InsertToDB(DB_HANDLE _handle) ..... END InsertToDB =20 *************** =20 =20 ; ESL script that is calling INT _db_handle =20 CALL[...] InsertToDB(_db_handle) ASYNC ON .... ; after this calling, handle to database connection will terminate in this= script, the called ESL script becomes the owner =20 *****************
****************** ; ESL script that is called RPC PROCEDURE InsertToDB(IN DB_HANDLE _handle) ..... END InsertToDB *************** =20 ; ESL script that is calling INT _db_handle =20 CALL[...] InsertToDB(_db_handle) ON .... ; after this calling the database connection is terminated in this script,= the called ESL script becomes the owner ***************
****************** ; ESL script that is called RPC PROCEDURE InsertToDB(DB_HANDLE _handle) ..... END InsertToDB *************** =20 =20 ; ESL script that is calling INT _db_handle =20 CALL[...] InsertToDB(_db_handle) SYNC ON .... ; after this calling, ESL script, that is calling, is till the owner of da= tabase connection ***************
Related pages: