- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務經營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網協(xié)會理事單位
- 安全聯(lián)盟認證網站身份V標記
- 域名注冊服務機構許可:滇D3-20230001
- 代理域名注冊服務機構:新網數(shù)碼
錯誤號:3704 錯誤描述:對象關閉時,不允許操作
這篇文章主要介紹了錯誤號: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
因為程序在同一個頁面循環(huán){aspcms:content}標簽時,原來的代碼在后面再調用該標簽時會不斷累加 sperStr值,造成該標簽數(shù)量越多,后面的SQL查詢字段,而Access數(shù)據(jù)庫,單表最多255個字段,SQL查詢里面一次查詢也最多不超過255個字段,當累加的字段數(shù)超過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
如果有錯誤,程序代碼會關閉數(shù)據(jù)。于是就出現(xiàn)了前文的錯誤 。
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP