日期:2014-05-17 浏览次数:20430 次
<%
Set Cmd_1 = Server.CreateObject("ADODB.Command")
Set Cmd_1.ActiveConnection=conn
Cmd_1.CommandText="textsum"
Cmd_1.CommandType=4
CMD_1.Prepared = true
Cmd_1.Parameters.Append cmd_1.CreateParameter("@sum_number",200,2,50)
Cmd_1.Parameters.Append cmd_1.CreateParameter("@sum_totalprice",200,2,50)
Set rs_1=Cmd_1.Execute
sum_number=cmd_1("@sum_number")
sum_totalprice=cmd_1("@sum_totalprice")
set Cmd_1 = nothing
%>
USE [数据库名]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[testsum]
@sum_number int output,
@sum_totalprice numeric(18,1) output
AS
BEGIN
SELECT sum(number) as @sum_number,sum(totalprice) as @sum_totalprice FROM 表
END