日期:2014-05-16 浏览次数:21016 次
CREATE PROCEDURE my_test
@dwzhanghao varchar(18),@zhyue numeric(18,2) OUTPUT
AS
set nocount on
begin
select *
from dwInfo
where dwInfo.dwzhanghao=@dwzhanghao
end
go
<html>
<head></head>
<body>
<%
Set conn = Server.CreateObject("ADODB.Connection") "
MyConStr="此处为数据库连接字符串"
conn.Open MyConStr
'从数据库一张表中取单位账号
set rs=server.createobject("adodb.recordset")
rs.open 查询字符串,conn,1,1
'另一张表中也有dwzhanghao字段,是对应的。根据单位账号,以此显示各单位的余额
Set dwzhye = Server.CreateObject("ADODB.Recordset")
dwzhye.open "Exec my_test rs("dwzhanghao")",conn
%>
<div>
账号为<%=rs(dwzhangh)%>的单位账号余额为:<%=dwzhye("zhye")%>
<div>
</html>
</body>