#INCLUDE Defaults.h DEFINE CLASS NewSession AS Session PROTECTED PROCEDURE Init SET TALK OFF SET EXCLUSIVE OFF SET MULTILOCKS ON SET DELETED ON SET SAFETY OFF SET CENTURY ON SET DATABASE TO DATABASE_NAME *!* DATABASE_NAME is a constant in my defaults.h constants file if not This.PostInit() return .f. endif ENDPROC PROCEDURE PostInit *!* for use by subclasses of this class instead of using the Init ENDPROC PROCEDURE mCloseTables Close Tables All ENDPROC PROCEDURE Release RELEASE This ENDPROC PROTECTED PROCEDURE Destroy This.PreDestroy() This.mCloseTables() ENDPROC PROCEDURE PreDestroy *!* for use by subclasses of this class instead of using the Destroy ENDPROC ENDDEFINEAll I have to do to use it is:
oSession = newobject('NewSession', 'UDC.FXP') with oSession *!* do whatever here endwith oSession.Release()