DBC_GetSP Procedure
This function return source code or fxp code of stored procedures.
=
DBC_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 function succeeds, the return value is _DBC_ObjectFound.

If the function fails, the return value is _DBC_ObjectNotFound.
Example
#INCLUDE "dbc.h"
SET PROCEDURE TO dfo.prg ADDITIVE
LOCAL lcAlias,lcDBC,luValue
lcAlias=SYS(2015)
lcDBC=HOME(2)+"\Tastrade\Data\tastrade.dbc"
USE (lcDBC) ALIAS (lcAlias) IN 0
=DBC_GetSP(lcAlias,_DBC_SP_TSource,@luValue)
?luValue
USE IN (lcAlias)
RELEASE PROCEDURE dfo.prg


See also
Expand/Collapse source code of procedure DBC_GetSP Source Code
LPARAMETERS lcAlias,liType,luValue
* lcAlias  - Alias of opended 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