Navigation: ABC Library Reference > RelationManager > RelationManager Methods >====== Init (initialize the RelationManager object) ====== | ![]() ![]() |
Init( **filemanager //[,uselogout] //)**
| Init | Initializes the RelationManager object. |
| filemanager | The label of the FileManager object for the RelationManager's primary file. By definition, the file referenced by this FileManager object is the RelationManager's primary file. |
| uselogout | A numeric constant, variable, EQUATE, or expression that determines whether cascaded updates or deletes are done within a transaction frame (LOGOUT/COMMIT). A value of zero (0) indicates no transaction framing; a value of one (1) indicates transaction framing. If omitted, //logout //defaults to zero (0). |
The **Init **method initializes the RelationManager object. To implement the RelationManager's transaction framing, all the files within a transaction must use the same file driver and that file driver must support LOGOUT.
Implementation:
The Init method sets the value of the Me and UseLogout properties.
The ABC Templates set the //uselogout //parameter based on the Enclose RI code in transaction frame check box in the Global Properties dialog.
Example:
** PROGRAM**
** INCLUDE('FILE.INC') !declare RelationManager class**
Access:Client CLASS(FileManager) !declare Access:Client class
Init PROCEDURE
** END**
Client FILE,DRIVER('TOPSPEED'),PRE(CLI),THREAD !declare Client file
IDKey KEY(CLI:ID),NOCASE,OPT,PRIMARY
Record RECORD,PRE()
ID LONG
Name STRING(20)
StateCode STRING(2)
** END**
** END **
** CODE**
** Access:Client.Init !initialize Access:Client obj**
** Relate:Client.Init(Access:Client,1) !init Relate:Client–use logout**
** Relate:Client.AddRelation( Relate:States ) !relate Client to States file**
** !program code**
** Relate:Client.Kill !shut down Relate:Client object**
** Access:Client.Kill !shut down Access:Client object**
See Also: Me





