ClassInitializeBefore

concerns

The ClassInitializeBefore class function is called for each object generated by a TCE class, before its class variables are initialized.

 

Syntax

ClassInitializeBefore()

Return value

No

Parameter

No

Example:

The ClassInitializeBefore function is used here to refine the database connections when an application starts, because ODBC classes are not loaded at this time.

 

Function ClassInitializeBefore() As Void

   Switch UCase(Server.ComputerName)

   Case "SERVER01"

      Server.DatabaseConnections.DSN("DBC1", True) := Server.DatabaseConnections.DSN("DBC1_S", True)

      Server.DatabaseConnections.DSN("DBC1", False) := Server.DatabaseConnections.DSN("DBC1_S", False)

   End Switch

End Function