GetSP Method
Class: _DBC
This method return source code or fxp code of stored procedures.
=
Object.GetSP
Parameter
lcAlias
DBC Alias
Type Character
Direction Input
Alias of opened DBC as table.
liType
Type of returned information.
Type Integer
Direction Input
ValueDescription
_DBC_SP_TSourceSource code
_DBC_SP_TFXPFXP code
luValue
Returned information.
By reference  
Direction Output
Return value Integer
If the method succeeds, the return value is _DBC_ObjectFound .

If the method fails, the return value is _DBC_ObjectNotFound .
Example
#INCLUDE "dbc.h"
SET PROCEDURE TO dbc.prg ADDITIVE
LOCAL lcAlias,loDBC,luValue
loDBC=CREATEOBJECT("_DBC")
lcAlias=SYS(2015)
=loDBC.OpenTable(HOME(2)+"\Tastrade\Data\tastrade.dbc",lcAlias,"")
=loDBC.GetSP(lcAlias,_DBC_SP_TSource,@luValue)
?luValue
loDBC.CloseTable(lcAlias)
RELEASE loDBC
RELEASE PROCEDURE dbc.prg


See also
Expand/Collapse source code of procedure GetSP Source Code
      LPARAMETERS lcAlias,liType,luValue
      * lcAlias  - Alias of opened DBC
      * liType   - Type (Source code/ P-Code)
      * @luValue - (output) Stored procedures source code/P-Code


      SELE (lcAlias) && Skip to DBC 
      * Find object
      LOCATE FOR OBJECTTYPE=_DBC_DataBase AND;
             UPPER(ObjectName)==UPPER(IIF(liType=_DBC_SP_TSource,_DBC_SP_Source,_DBC_SP_FXP))
      IF !FOUND() && If not found
         RETURN _DBC_ObjectNotFound && Get out
      ENDIF
      luValue=CODE
      RETURN _DBC_ObjectFound