CREATE OR REPLACE PROCEDURE RETBOM       
  (P_CCN EDI_RP_COMP.CCN%TYPE,P_ITEM EDI_RP_COMP.ITEM%TYPE, P_REVISION EDI_RP_COMP.REVISION%TYPE,P_EFFDATE EDI_RP_COMP.RP_COMP_CONFIG_DATE%TYPE,A OUT VARCHAR2) As
BEGIN
A := F_RETURN_BOM_NO(P_CCN,P_ITEM,P_REVISION,P_EFFDATE);

INSERT INTO DEL_A VALUES(A);
COMMIT;
END RETBOM;第4个参数为日期型,现在基本确定是VB调用过程时由于日期参数传递引起的错误。VB中的调用如下:
                     cmdBom.CommandType = adCmdStoredProc
                     cmdBom.CommandText = "RETBOM"
                     With cmdBom.Parameters
                          .Append cmdBom.CreateParameter("P_CCN", adBSTR, adParamInput)
                          .Append cmdBom.CreateParameter("P_ITEM", adBSTR, adParamInput)
                          .Append cmdBom.CreateParameter("P_REVISION", adBSTR, adParamInput)
                          .Append cmdBom.CreateParameter("P_EFFDATE", adDBDate, adParamInput)                         .Append cmdBom.CreateParameter("A", adBSTR, adParamOutput)
                     End With
                     cmdBom.Parameters("P_CCN") = recBatch!CCN
                     cmdBom.Parameters("P_ITEM") = recBatch!Item
                      cmdBom.Parameters("P_REVISION") = recBatch!Revision
             cmdBom.Parameters("P_EFFDATE") =recBatch!RP_COMP_CONFIG_DATE
                     
                     
                     cmdBom.Execute运行报错:
   ORA-06502: PL/SQL: 数字或值错误 :  字符串缓冲区太小
ORA-06512: 在"EDI.RETBOM", line 6
ORA-06512: 在line 1
有高手知道怎么做吗?分数无所谓,只要问题解决!有不明白问题的,提出来,我在线解释!

解决方案 »

  1.   

    ORA-06502 PL/SQL: numeric or value errorstringCause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
    ORA-06512 at stringline stringCause: Backtrace message as the stack is unwound by unhandled exceptions.Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or database administrator.