上传文件出现
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
服务器对象 错误 'ASP 0177 : 800401f3'
Server.CreateObject 失败
/bangong/upload.Asp,行3
无效的 ProgID。 若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp 。
upload.asp 的代码是
<%
Dim upl, NewFileName
Set upl = Server.CreateObject("ASPSimpleUpload.Upload")
%>
<head>
<STYLE>
<!--
.border { background-color: #D0D7AF; border-left: 1 solid #ECEFDE;
border-right: 1 solid #808000; border-top: 1 solid #EFF1E4;
border-bottom: 1 solid #808000 }
p, td, input, select { font-size: 9pt }
A:visited {TEXT-DECORATION: none;color:#000000}
A:active {TEXT-DECORATION: none;color:#ff0000}
A:hover {TEXT-DECORATION: underline;color:#ff0000}
A:link {TEXT-DECORATION: none;color:#000000}
.button01 { background-color: #D0D7AF; border: 1 solid #999966 }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#EAEDDC" TOPMARGIN="0" LEFTMARGIN="0">
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD WIDTH="100%" HEIGHT="25" CLASS="border">
<P ALIGN="center">文件添加成功。为了他人能够浏览文件内容,必须上传相关格式文件!!!</TD>
</TR>
<TR>
<TD WIDTH="100%"><br><P ALIGN="center" style="margin: 12">
<%
If Len(upl.Form("File1")) > 0 Then
NewFileName = "/bangong/upload/" & upl.ExtractFileName(upl.Form("File1"))
set conn=server.createobject("adodb.connection")
provider="provider=microsoft.jet.oledb.4.0;"
DBPath ="data source=" & Server.MapPath("document.mdb")
conn.Open provider & DBPath
'connstr="driver={SQL server};server=bdxf2000;uid=sa;pwd=sql2000;database=documents"
'conn.open connstr
Set rs=Server.CreateObject("ADODB.Recordset")
spl="select top 1 * from document order by id desc"
rs.open spl,conn,3,2
nnnn=upl.extractfilename(upl.form("file1"))
rs("d_path")=nnnn
rs.update
If upl.SaveToWeb("File1", NewFileName) Then
Response.Write("文件上传成功.")
Else
Response.Write("文件上传出现错误")
End If
End If
%><br><P ALIGN="center"> </P>
<P ALIGN="center"> </P>
<P ALIGN="center"> </P>
<P ALIGN="center"> </TD>
</TR>
</TABLE>
<P ALIGN="center">【<A HREF="javascript:self.close()">关闭窗口</A>】</P>
</BODY>
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
服务器对象 错误 'ASP 0177 : 800401f3'
Server.CreateObject 失败
/bangong/upload.Asp,行3
无效的 ProgID。 若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp 。
upload.asp 的代码是
<%
Dim upl, NewFileName
Set upl = Server.CreateObject("ASPSimpleUpload.Upload")
%>
<head>
<STYLE>
<!--
.border { background-color: #D0D7AF; border-left: 1 solid #ECEFDE;
border-right: 1 solid #808000; border-top: 1 solid #EFF1E4;
border-bottom: 1 solid #808000 }
p, td, input, select { font-size: 9pt }
A:visited {TEXT-DECORATION: none;color:#000000}
A:active {TEXT-DECORATION: none;color:#ff0000}
A:hover {TEXT-DECORATION: underline;color:#ff0000}
A:link {TEXT-DECORATION: none;color:#000000}
.button01 { background-color: #D0D7AF; border: 1 solid #999966 }
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#EAEDDC" TOPMARGIN="0" LEFTMARGIN="0">
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD WIDTH="100%" HEIGHT="25" CLASS="border">
<P ALIGN="center">文件添加成功。为了他人能够浏览文件内容,必须上传相关格式文件!!!</TD>
</TR>
<TR>
<TD WIDTH="100%"><br><P ALIGN="center" style="margin: 12">
<%
If Len(upl.Form("File1")) > 0 Then
NewFileName = "/bangong/upload/" & upl.ExtractFileName(upl.Form("File1"))
set conn=server.createobject("adodb.connection")
provider="provider=microsoft.jet.oledb.4.0;"
DBPath ="data source=" & Server.MapPath("document.mdb")
conn.Open provider & DBPath
'connstr="driver={SQL server};server=bdxf2000;uid=sa;pwd=sql2000;database=documents"
'conn.open connstr
Set rs=Server.CreateObject("ADODB.Recordset")
spl="select top 1 * from document order by id desc"
rs.open spl,conn,3,2
nnnn=upl.extractfilename(upl.form("file1"))
rs("d_path")=nnnn
rs.update
If upl.SaveToWeb("File1", NewFileName) Then
Response.Write("文件上传成功.")
Else
Response.Write("文件上传出现错误")
End If
End If
%><br><P ALIGN="center"> </P>
<P ALIGN="center"> </P>
<P ALIGN="center"> </P>
<P ALIGN="center"> </TD>
</TR>
</TABLE>
<P ALIGN="center">【<A HREF="javascript:self.close()">关闭窗口</A>】</P>
</BODY>