Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: Always call the Get_Status function after calling Repository().

See also

Repository() functionTCompile methodGet_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