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
%>