当前位置: 技术问答>java相关
help!! what's wrong with my page !!!
来源: 互联网 发布时间:2015-04-27
本文导语: --------------------------------------------------------------------------------------------------- -- (sql) --------------------------------------------------------------------------------------------------- FUNCTION f_BumonmeiSel ( i_KaikeiCen_c ...
---------------------------------------------------------------------------------------------------
-- (sql)
---------------------------------------------------------------------------------------------------
FUNCTION f_BumonmeiSel (
i_KaikeiCen_c IN VARCHAR2
,i_bumoncd IN VARCHAR2
,o_bupinmei OUT VARCHAR2
,o_sts_code OUT NUMBER
,o_sts_err OUT VARCHAR2
) RETURN NUMBER
IS
ret NUMBER := 0;
debug_path VARCHAR2(50) := '/tmp';
sqler_file VARCHAR2(50) := 'sqlerr.log';
BEGIN
o_sts_code := 0;
o_sts_err := NULL;
SELECT
name
INTO
o_bupinmei
FROM
name
WHERE trim(centcd) = i_KaikeiCen_c
AND trim(code) = i_bumoncd ;
ret := CM.CRNORMAL;
RETURN ret;
EXCEPTION
WHEN OTHERS THEN
CMDBAC.p_ErrCatch('GI221700','f_BumonmeiSel');
CMLGPT.p_DbErrPut('GI221700','f_BumonmeiSel','name select',NULL);
o_sts_code := SQLCODE;
o_sts_err := SQLERRM;
CMDBAC.p_DebugPrt('GI221700.f_BumonmeiSel',SUBSTR(TO_CHAR(SQLCODE)||''|| SQLERRM,1,256),
debug_path,sqler_file);
RETURN CM.CRERROR;
END f_BumonmeiSel;
---------------------------------------------------------------------------------------------------
-- (java)
---------------------------------------------------------------------------------------------------
private String getBumonmeiSel( CmFrHdl frhdl, String centcd, String bumoncd ) throws CmException
{
CmDboj frhdlwork = new CmDboj();
String name = "";
frhdlwork.setAPIName( "callStdFunc" );
frhdlwork.setReturnType( CM_C_DB_NUMBER );
frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_IN_PARA, centcd );
frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_IN_PARA, bumoncd );
int outp1 = frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_OUT_PARA );
int osts1 = frhdlwork.addParameterList( CM_C_DB_NUMBER, CM_C_DB_OUT_PARA );
int osts2 = frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_OUT_PARA );
raiseEvent(frhdl,getClass().getName(),"f_BumonmeiSel", frhdlwork);
name = String.valueOf(frhdlwork.getParameter(outp1));
if ( name == null )
{
name = "";
}
return name ;
}
-- (sql)
---------------------------------------------------------------------------------------------------
FUNCTION f_BumonmeiSel (
i_KaikeiCen_c IN VARCHAR2
,i_bumoncd IN VARCHAR2
,o_bupinmei OUT VARCHAR2
,o_sts_code OUT NUMBER
,o_sts_err OUT VARCHAR2
) RETURN NUMBER
IS
ret NUMBER := 0;
debug_path VARCHAR2(50) := '/tmp';
sqler_file VARCHAR2(50) := 'sqlerr.log';
BEGIN
o_sts_code := 0;
o_sts_err := NULL;
SELECT
name
INTO
o_bupinmei
FROM
name
WHERE trim(centcd) = i_KaikeiCen_c
AND trim(code) = i_bumoncd ;
ret := CM.CRNORMAL;
RETURN ret;
EXCEPTION
WHEN OTHERS THEN
CMDBAC.p_ErrCatch('GI221700','f_BumonmeiSel');
CMLGPT.p_DbErrPut('GI221700','f_BumonmeiSel','name select',NULL);
o_sts_code := SQLCODE;
o_sts_err := SQLERRM;
CMDBAC.p_DebugPrt('GI221700.f_BumonmeiSel',SUBSTR(TO_CHAR(SQLCODE)||''|| SQLERRM,1,256),
debug_path,sqler_file);
RETURN CM.CRERROR;
END f_BumonmeiSel;
---------------------------------------------------------------------------------------------------
-- (java)
---------------------------------------------------------------------------------------------------
private String getBumonmeiSel( CmFrHdl frhdl, String centcd, String bumoncd ) throws CmException
{
CmDboj frhdlwork = new CmDboj();
String name = "";
frhdlwork.setAPIName( "callStdFunc" );
frhdlwork.setReturnType( CM_C_DB_NUMBER );
frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_IN_PARA, centcd );
frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_IN_PARA, bumoncd );
int outp1 = frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_OUT_PARA );
int osts1 = frhdlwork.addParameterList( CM_C_DB_NUMBER, CM_C_DB_OUT_PARA );
int osts2 = frhdlwork.addParameterList( CM_C_DB_VARCHAR, CM_C_DB_OUT_PARA );
raiseEvent(frhdl,getClass().getName(),"f_BumonmeiSel", frhdlwork);
name = String.valueOf(frhdlwork.getParameter(outp1));
if ( name == null )
{
name = "";
}
return name ;
}
|
文不达意,都不知道你想干什么