良心备受谴责的故事:在对应所需名称或序数的集合中,未找到项目。

来源:百度文库 编辑:中科新闻网 时间:2024/04/30 00:36:16
ADODB.Command 错误 '800a0cc1'

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

/Blog/inc/calendar.asp,行 53

代码如下:
<%
dim selectdate,l_time,cat_id,linkcount,blogmonth
selectdate=Request("date")
redim linkdays(2,0)
linkcount=0
blogmonth=trim(request.QueryString("month"))
dim ccode
sub calendar()
'response.Write selectdate
dim ca_bg_color,ca_head_color,ca_week_color,ca_day_color,ca_nowday_color
dim thisbgcolor,ca_today_color,ca_headtext_color
dim c_year,c_month,c_day,logdate,today,tomonth,toyear,sql,s,count,b,c
dim thismonth,thisdate,thisyear,startspace,nextmonth,nextyear,promonth,proyear,linktrue
dim rs_month
'getsearchcode
'====================================================日历代码
ca_bg_color="" '日历背景即边线颜色
ca_head_color="" '头部颜色
ca_week_color="" '星期栏颜色
ca_day_color="" '主背景色
ca_nowday_color="" '按日查看时所查看日的颜色
ca_today_color="" '今天的颜色
ca_headtext_color="" '首部年月文字的颜色

if selectdate="" then
c_year=year(blognow())
c_month=month(blognow())
c_day=0
else
c_year=year(selectdate)
c_month=month(selectdate)
c_day=day(selectdate)
end if

if blogmonth<>"" then
c_year=year(blogmonth)
c_month=month(blogmonth)
c_day=day(blogmonth)
end if

logdate=c_year&"-"&c_month
c_year=cint(c_year)
c_month=cint(c_month)
c_day=cint(c_day)
'===============================================添加连接

if issqldate then
dim cmd,rs
Set cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection=conn
Cmd.CommandText="ob_calendar"
Cmd.CommandType=4
这里就是53行 Cmd("@logdate")=logdate
Cmd("@show_username")=show_username
set rs_month=cmd.Execute
set cmd=nothing
else
sql="SELECT * FROM blog WHERE datediff('n','"&logdate&"',addtime)>0 and

username='"&show_username&"'"
set rs_month=conn.EXECUTE(sql)
end if
'response.write sql

dim theday
theday=0

do while not rs_month.eof
if day(rs_month("addtime"))<>theday then
theday=day(rs_month("addtime"))
redim preserve linkdays(2,linkcount)
linkdays(0,linkcount)=month(rs_month("addtime"))
linkdays(1,linkcount)=day(rs_month("addtime"))
linkdays(2,linkcount)="blog.asp?name="&show_username&"&date="&logdate&"-"&theday
linkcount=linkcount+1
end if
rs_month.MoveNext
Loop
set rs_month=nothing
'===================================================

%>

53行是这里

if issqldate then
dim cmd,rs
Set cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection=conn
Cmd.CommandText="ob_calendar"
Cmd.CommandType=4
Cmd("@logdate")=logdate
Cmd("@show_username")=show_username
set rs_month=cmd.Execute
set cmd=nothing
这句就是 Cmd("@logdate")=logdate 53行

我把ACCESS的数据库该成SQL的数据库了。
就出现这个问题了,不知道是怎么回事??

谁知道是怎么回事啊,怎么解决啊???