Question : Oracle Packages

I am trying to understand a stored procedure that uses a package.  It just seems to be incrementing and decrementing a variable within the package and not using the value elsewhere that I can find.

I will attach the code for the package and a snippet that uses it:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
CREATE OR REPLACE PACKAGE hdb."GLOBALPKG" 
AS
TYPE RCT1 IS REF CURSOR;
TRANCOUNT INTEGER := 0;
IDENTITY INTEGER;
END;
/

and in a stored proc:

CREATE OR REPLACE PROCEDURE       hdb.spDoStuff 
(
	IN_SSN                     IN      	CHAR DEFAULT NULL,
	RCT1                        IN  OUT 	GLOBALPKG.RCT1

)

...
GLOBALPKG.TRANCOUNT := GLOBALPKG.TRANCOUNT - 1;

...

Answer : Oracle Packages

yes,  each database connection will have its own session.
Random Solutions  
 
programming4us programming4us