错误号:3704 错误描述:对象关闭时,不允许操作
“错误号:3704 错误描述:对象关闭时,不允许操作。sql=select top 10 ContentID,a.SortID,a.GroupID,a.Exc.......”
inc/AspCms_MainClass.asp文件,大约900行,原来代码为:
复制代码代码如下:
if str="content" or str="news" or str="product" or str="down" or str="pic" then
sperStrs =conn.Exec("select SpecCategory+'_'+SpecField from {prefix}SpecSet Order by SpecOrder Asc,SpecID", "arr")
if isarray(sperStrs) then
for each spec in sperStrs
sperStr = sperStr&","&spec
next
end if
我们修改为:
复制代码代码如下:
if str="content" or str="news" or str="product" or str="down" or str="pic" then
sperStrs =conn.Exec("select SpecCategory+'_'+SpecField from {prefix}SpecSet Order by SpecOrder Asc,SpecID", "arr")
if isarray(sperStrs) then
sperStr=""
for each spec in sperStrs
sperStr = sperStr&","&spec
next
end if
因为程序在同一个页面循环{aspcms:content}标签时,原来的代码在后面再调用该标签时会不断累加 sperStr值,造成该标签数量越多,后面的SQL查询字段,而Access数据库,单表最多255个字段,SQL查询里面一次查询也最多不超过255个字段,当累加的字段数超过255个时,运行程序就会出错。此时,会引起inc/AspCms_MainClass.asp文件,大约152行的程序代码,内容是:
复制代码代码如下:
If Not DebugMode Then
if Err then
errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:set dbConn=nothing:isConnect=false
echoErr err_03,errid,errdes&"sql="&sqlStr
end if
end if
如果有错误,程序代码会关闭数据。于是就出现了前文的错误 。
- 标签
延伸阅读
- 上一篇:PageAdmin 安装IIS配置图解教程
- 下一篇:没有了
网友评论
其它cms热门文章
- 简单的改变 joomla 后台administ
04-30
- PageAdmin 安装IIS配置图解教程
03-30
- aspcms后台美化删除版权信息等等
03-30
- shopex二次开发添加仓库模块代码
03-30
- 在本地IIS调试LebiShop多语言网
03-30
- JEEcms新闻下载内容页添加关键字
03-30
- iPad版手机QQ浏览器的产品设计风
03-30
- emlog添加功能-日志分享,评论gra
03-30
- 最土团购系统整合ucenter详细步
03-30
- cPanel Cron jobs定时备份和优化
03-30
- 其它cms最近更新