Page History
...
null = Compilation failed. Use Get_Status() to test for error return.
...
2 = Compilation successful. Field 2 returns the date and time of compilation.
Note: Always call the Get_Status function after calling Repository().
See also
Repository() function, TCompile method, Get_Repos_Entities().
Example
Code Block |
---|
/* Compile the source code of the CENTERWINDOW stored procedure */ Declare Function Repository, Get_Status AppID = @APPID<1> ;* current application TypeID = "STPROC" ;* OpenInsight stored procedures ClassID = "" ;* Not Applicable Stored_Proc_Name = 'CENTERWINDOW' recompile_if_unchanged = '' cleanup_orphan_entities = '' creserve_linemarks = '' entid = AppID : '*' : TypeID : '*' : ClassID : '*' : Stored_Proc_Name result = Repository("COMPILE", entid, recompile_if_unchanged, cleanup_orphan_entities, preserve_linemarks) * test result begin case case result = '' If Get_Status(ErrCode) then call msg(@window, 'Error Message returned: ' : ErrCode) end case result = 1 call msg(@window, 'Compilation not needed') case result<1> = 2 call msg(@window, 'Compilation successful, compiled at ' : result<2>) end case |