zoukankan      html  css  js  c++  java
  • ASP调用ORACLE的存储过程

    CREATE OR REPLACE PACKAGE BODY ORCLETESTYL IS
    /*
      * 処理名       :GETDATA2
      * パラメーター :
      *                  KAISHACD          IN VARCHAR2(2)      会社コード
      *                  DELFLG             IN VARCHAR2(1)      削除フラグ
      *                  HACHUBNGO     IN OUT CHRSOR     発注番号
      */
      PROCEDURE GETDATA2(KAISHACD IN VARCHAR2,
                                         DELFLG     IN VARCHAR2,
                                         RECORDCOUNT  OUT NUMBER) IS
       BEGIN
      
       SELECT COUNT(T.HACHUBNGO) INTO RECORDCOUNT
       FROM S02E001 T
       WHERE T.KAISHACD = KAISHACD
       AND     T.DELFLG = DELFLG;
      
       EXCEPTION
      -- 異常の処理
      WHEN OTHERS THEN
        RECORDCOUNT := NULL;  
       END GETDATA2;
    END ORCLETESTYL;

    <%

     Dim dbConn
     Set dbConn = Server.CreateObject("ADODB.Connection")
      
     ' データベース連続を開く
     dbConn.Open "DSN=NYUKA;UID=nyuka;PWD=nyuka"  

    Dim cmdRecordCount
        
    Set cmdRecordCount = Server.CreateObject("ADODB.Command")

    With cmdRecordCount

            .ActiveConnection = dbConn
            .CommandType = 4
            .Prepared = True
            .CommandText = "ORCLETESTYL.GETDATA2"
            .Parameters.Append .CreateParameter("@KAISHACD",200,1,2,Request("kaishacd"))
            .Parameters.Append .CreateParameter("@DELFLG",200,1,1,Request("delflg"))      
            .Parameters.Append .CreateParameter("@RECORDCOUNT",3,2)

            .Execute()
    End With

    response.Write(cmdRecordCount("@RECORDCOUNT").Value)

    dbConn.Close

    %>

     


            
     

  • 相关阅读:
    # beta冲刺(2/7)
    # beta冲刺(1/7)
    福大软工 · 最终作业
    软工随笔纪实 《个人日志》
    beta答辩总结
    beta冲刺(6/7)
    (beta冲刺5/7)
    beta冲刺(4/7)
    beta冲刺(3/7)
    beta冲刺(2/7)
  • 原文地址:https://www.cnblogs.com/yourancao520/p/1385438.html
Copyright © 2011-2022 走看看