downplus中的无效使用 Null: ‘replace’错误的解决方法
脚本之家
错误全部文本如下:
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;
今天就说这么多…嘎嘎,有问题希望大家指出!!
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;
今天就说这么多…嘎嘎,有问题希望大家指出!!