错误提示
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument
/zhuyuping/web_admin/conn.asp, line 100
conn.asp代码:
<!--#include file="../data.asp"-->
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheC
Response.AddHeader " ragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache, must-revalidate"
'--------------------------------------------------------------------------
Dim rs,Conn,conn2
On Error Resume Next
'主站数据联接
set Conn=Server.CreateObject ("Adodb.Connection")
Conn.Open "provider=microsoft.jet.oledb.4.0;" & "data source = " & server.mappath("../"&const_AccessDatabase&"")
'采集数据联接
set Conn2=Server.CreateObject ("Adodb.Connection")
Conn2.Open "provider=microsoft.jet.oledb.4.0;" & "data source = " & server.mappath("../"&const_ZJDatabase&"")
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请检查连接字符串。"
Response.End
End If
On Error GoTo 0
function strlogin(str)
if str="" or isnull(str) then
strlogin=str
exit function
end if
strlogin = replace(str,"&","")
strlogin = replace(strlogin,"%","")
strlogin = replace(strlogin,chr(34),"")
strlogin = replace(strlogin,"=","")
strlogin = replace(strlogin," ","")
strlogin = replace(strlogin,"<","")
strlogin = replace(strlogin,">","")
strlogin = replace(strlogin,"(","")
strlogin = replace(strlogin,")","")
end function
function utf8(str)
if str="" or isnull(str) then
utf8=str
exit function
end if
utf8 = replace(str,"&","&")
utf8 = replace(utf8,"",""")
utf8 = replace(utf8,"<","<")
utf8 = replace(utf8,">",">")
utf8 = replace(utf8," "," ")
utf8 = replace(utf8,"$","$$")
utf8 = replace(utf8,"'","'")
utf8 = replace(utf8,vbnewline,"<br/>")
end function
function CreateFolder(str)
dim UploadPath,Path,i,FSOObj
UploadPath=split(Replace(str,"\","/"),"/")
Path = server.mappath(Request.ServerVariables("SCRIPT_NAME"))
Path=left(Path,instrrev(Path,"\" ) - 1 )
path=path & "/../"
for i=0 to ubound(UploadPath)
if UploadPath(i)<>"" then
path=path & UploadPath(i) & "/"
Set FsoObj=Server.CreateObject("Scripting.FileSystemObject")
IF FSOObj.FolderExists(path) = False then
FsoObj.CreateFolder(path)
end if
Set FsoObj=Nothing
end if
next
end function
function CreateFile(str,Filepath)
dim txt,Path,FSO,fout
txt=Replace(trim(str),chr(13)&chr(10),vbNewLine)
Path = server.mappath(Request.ServerVariables("SCRIPT_NAME"))
Path=left(Path,instrrev(Path,"\" ) - 1 )
path=path & "/../" & Filepath
Set fso = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(path) = False then
Set fout = fso.Createtextfile(path,true)
fout.write txt '不换行
'fout.writeline txt '换行
fout.close
set fout=nothing
end if
set fso=nothing
end function
function DelFile(Filepath)
dim Path,FSO
Path = server.mappath(Request.ServerVariables("SCRIPT_NAME"))
Path=left(Path,instrrev(Path,"\" ) - 1 )
path=path & "/../" & Filepath
Set fso = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(path) = True then
Fso.deleteFile path,true
end if
set fso=nothing
end function
function DelFolder(Filepath)
dim Path,FSO
Path = server.mappath(Request.ServerVariables("SCRIPT_NAME"))
Path=left(Path,instrrev(Path,"\" ) - 1 )
path=path & "/../" & Filepath
Set FsoObj=Server.CreateObject("Scripting.FileSystemObject")
IF FSOObj.FolderExists(path) = True then
FsoObj.deleteFolder path,true
end if
Set FsoObj=Nothing
end function
%>
国外主机真郁闷啊。大家帮帮忙,先谢了!
[ 本帖最后由 北极末端 于 2010-8-2 01:48 PM 编辑 ] |