标题:[求助]储存过程调用出错拉
取消只看楼主
滚水六脚
Rank: 1
等 级:新手上路
帖 子:132
专家分:0
注 册:2004-8-16
 问题点数:0 回复次数:2 
[求助]储存过程调用出错拉

CREATE PROCEDURE [sp_Seekerinfo]
As
Begin
declare @LastUpdateDate varchar(50)
declare @GetSearch Nvarchar(600)
declare @s Nvarchar(1000)
set @s = 'SELECT Top 1000 seekerID,trueName,gender,age,MaxEduLevel,maxEduSchool,maxEduCourse,WorkPos,LastUpdateDate FROM v_seekerInfo WHERE isvalid = 1 '+@GetSearch+' GROUP BY seekerID,trueName,gender,age,MaxEduLevel,maxEduSchool,maxEduCourse,WorkPos,LastUpdateDate order by '+@LastUpdateDate+' desc'
Exec(@s)
exec sp_executesql @s
End
GO
听各位忠告已经做了储存过程,不过不知道怎么调用,老出错
调用代码:
<!--#include file="common/conn.asp" -->
<% Set cmd = Server.CreateObject("Adodb.Command")
Set Rs_Category = Server.CreateObject("Adodb.Recordset")
strCause=" and ( MaxEduLevel >= 20 AND MaxEduLevel <= 70) AND (age >= 18 AND age <= 60) AND abs(DateDiff(d,Getdate(),LastUpdateDate))<=90 "
cmd.ActiveConnection = dbconn
cmd.CommandText = "sp_Seekerinfo"
cmd.CommandType = &H0004
cmd("@LastUpdateDate")="LastUpdateDate"
cmd("@GetSearch") = strCause

Set Rs_Category = cmd.Execute()
While Not Rs_Category.Eof
Response.Write(Rs_Category("trueName")&"<br>")
Wend
Set Rs_Category = Nothing
Set Cmd = Nothing %>

ADODB.Command 错误 '800a0cc1'

在对应所需名称或序数的集合中,未找到项目。

/****.asp,行 8

搜索更多相关主题的帖子: 储存 
2006-11-08 17:54
滚水六脚
Rank: 1
等 级:新手上路
帖 子:132
专家分:0
注 册:2004-8-16
得分:0 
cmd("@LastUpdateDate")="LastUpdateDate"
cmd("@GetSearch") = strCause

第8、9行!
2006-11-08 18:01
滚水六脚
Rank: 1
等 级:新手上路
帖 子:132
专家分:0
注 册:2004-8-16
得分:0 
搞数据库的大哥大姐们,帮我看下储存过程有没问题!谢谢
2006-11-09 08:17



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-101565-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.785894 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved