错误全部文本如下:
Microsoft VBScript 运行时错误 错误 ‘800a005e’

无效使用 Null: ‘replace’
/XXX/inc_function.asp,行 764

我们来看看这段错误的代码,打开后台的inc_function.asp.找到760行附近的语句。
代码如下:
sPath = DownLoad_FileSavePath
sPath = Replace(sPath,”\”,”/”)
sPath = Replace(sPath,”{YYYY}”,Year(SoftInsertDate),1,-1,1)
sPath = Replace(sPath,”{YYY}”,Year(SoftInsertDate),1,-1,1)
sPath = Replace(sPath,”{YY}”,right(Year(SoftInsertDate),2),1,-1,1)
sPath = Replace(sPath,”{Y}”,right(Year(SoftInsertDate),2),1,-1,1)
sPath = Replace(sPath,”{MM}”,Month(SoftInsertDate),1,-1,1)
sPath = Replace(sPath,”{M}”,Month(SoftInsertDate),1,-1,1)
sPath = Replace(sPath,”{DD}”,Day(SoftInsertDate),1,-1,1)
sPath = Replace(sPath,”{D}”,Day(SoftInsertDate),1,-1,1)
sPath = Replace(sPath,”{ClassID}”,SoftClassID,1,-1,1)
sPath = Replace(sPath,”{FileName}”,SoftFrontStr&softid&”.”&FileExtensionName,1,-1,1)
GetSoftUrl = SystemUrl&SoftFolderName&”/”&sPath

其中上面说的是第764行是这条语句;
sPath = Replace(sPath,”{ClassID}”,SoftClassID,1,-1,1)

一看错误就知道了,原来是有个分类的ID是空的,但是我们使用
SELECT * FROM dp_softlist WHERE softclassid = NULL;

却查不到空的记录,于是乎,哥着急了,想了个笨办法,将今天添加的软件的ID全部拿过去,一起查询,语句如下:
SELECT * FROM dp_softlist WHERE softid
IN (1986,1983,1982,1981,1611,1980,843,1979,1978,1133,937,1976,1984,1975,1973,1845)

找到了那2条空的记录,于是乎,咱们
DELETE dp_softlist WHERE softid IN(1984,1985)

重新生成.oh yeah!错误解决!~~
最后事实证明,空的记录是可以用is null来查询的.下面这条语句比上面用笨办法查ID的简单多了
SELECT * FROM dp_softlist WHERE softcreatedate IS NULL;

1.本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2.分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3.不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4.本站提供的源码、模板、插件等其他资源,都不包含技术服务请大家谅解!
5.如有链接无法下载或失效,请联系管理员处理!
6.本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!