asp调用存储过程,得不到记录
时间:2011-08-01
来源:互联网
存储过程如下:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[comp]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[comp]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE PROC comp
as
SET NOCOUNT ON
create table #comp(fcomp varchar(200),fconno varchar(200),fgoods varchar(200),fstarttime varchar(200),fendtime varchar(200),famount decimal(28,2),
fysamount decimal(28,2),fendamount decimal(28,2),ftime datetime,fxh varchar(200))
insert into #comp
select fname,'','','','',0,0,0,'','1' from company order by 1
insert into #comp
select fcomp,fconno,fgoods,fstarttime,fendtime,fconamount,fysamount,fendamount,ftime,'2' from contract order by fcomp,fconno,ftime
insert into #comp
select fcomp,fconno,fskxh,'-','-',famount,fysamount,fendamount,ftime,'3' from skplan order by fcomp,fconno,ftime
set nocount off
select * from #comp order by fcomp,fconno,fxh
drop table #comp
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
asp代码如下:
dim cmd
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Comp"
Cmd.CommandType = 4
cmd.Prepared = true
Set Rs = Cmd.Execute
请问是否那里有问题,我无论如何,都无法得到rs记录集的记录。好像是没取到记录数。
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[comp]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[comp]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE PROC comp
as
SET NOCOUNT ON
create table #comp(fcomp varchar(200),fconno varchar(200),fgoods varchar(200),fstarttime varchar(200),fendtime varchar(200),famount decimal(28,2),
fysamount decimal(28,2),fendamount decimal(28,2),ftime datetime,fxh varchar(200))
insert into #comp
select fname,'','','','',0,0,0,'','1' from company order by 1
insert into #comp
select fcomp,fconno,fgoods,fstarttime,fendtime,fconamount,fysamount,fendamount,ftime,'2' from contract order by fcomp,fconno,ftime
insert into #comp
select fcomp,fconno,fskxh,'-','-',famount,fysamount,fendamount,ftime,'3' from skplan order by fcomp,fconno,ftime
set nocount off
select * from #comp order by fcomp,fconno,fxh
drop table #comp
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
asp代码如下:
dim cmd
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Comp"
Cmd.CommandType = 4
cmd.Prepared = true
Set Rs = Cmd.Execute
请问是否那里有问题,我无论如何,都无法得到rs记录集的记录。好像是没取到记录数。
作者: ggzgeguoz 发布时间: 2011-08-01
http://topic.csdn.net/u/20110613/15/6d442ec9-f6e3-46b2-b4da-12d63fce07b3.html
作者: yaxiya 发布时间: 2011-08-01
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28