| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 629 人关注过本帖
标题:求助:上传不了文件
只看楼主 加入收藏
tasupi
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-10-31
收藏
 问题点数:0 回复次数:0 
求助:上传不了文件
提示报错
AceCRM 错误 '800a005b'

Object variable or With block variable not set

/bbs/AddUploadFileExe.asp,行 70


代码
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<p>&lt;%@ Language=VBScript %&gt;<br />
  &lt;% Option Explicit %&gt;<br />
  &lt;% Response.Expires = 0 %&gt;<br />
  &lt;% Response.Buffer = True %&gt;<br />
  &lt;% Server.ScriptTimeout = 600 %&gt;<br />
  &lt;!--#include file = &quot;../System/Adovbs.inc&quot; --&gt;<br />
  &lt;!--#include file = &quot;../System/ConstDefine.asp&quot; --&gt;<br />
  &lt;!--#include file = &quot;../System/FunDefine.asp&quot; --&gt;<br />
  &lt;!--#include file = &quot;../System/VarDefineExe.asp&quot; --&gt;<br />
  &lt;%<br />
  '上传附件直接保存为文件的模式,不要删除<br />
  '======================================<br />
  'Dim upfile<br />
  'Set upfile = Server.CreateObject(&quot;uploadcom.upfile&quot;)<br />
  'upfile.FileSaveAs(&quot;d:\&quot;+upfile.FileName)<br />
  'set upfile = nothing<br />
  'Response.End<br />
  '======================================</p>
<p>%&gt;</p>
<p>&lt;%<br />
  If szEmployeeName = &quot;8888观摩客人&quot;  Then<br />
  writeGoBack TEXT_NWQM<br />
  Set objCommon = Nothing<br />
  Set objConn = Nothing<br />
  Response.End<br />
  End If</p>
<p>Dim szCreatorTypeID<br />
  Dim szCoObjectTypeID<br />
  Dim szCreatorName<br />
  Dim szContent<br />
  Dim vBinaryData<br />
  Dim nMaxUploadFileSize<br />
  Dim szCoObject<br />
  Dim szSubject<br />
  Dim szisEdit<br />
  Dim szLinkType<br />
</p>
<p>szSubject = Request(&quot;Subject&quot;)<br />
  szCoObject = Request(&quot;CoObject&quot;)<br />
  szCreatorTypeID = szEmployeeTypeID<br />
  szCreatorName = Trim(Request(&quot;CreatorName&quot;) &amp; &quot;&quot;)<br />
  szContent = Request(&quot;Content&quot;)<br />
  szCoObjectTypeID = Trim(Request(&quot;CoObjectTypeID&quot;) &amp; &quot;&quot;)<br />
  szLinkType = Request(&quot;LinkType&quot;) &amp; &quot;&quot;<br />
  szisEdit = Request(&quot;isEdit&quot;)<br />
  'szCoObjectTypeID = &quot;Email&quot;<br />
  vBinaryData = Request.BinaryRead(Request.TotalBytes)</p>
<p>&nbsp;</p>
<p>nMaxUploadFileSize = getParameterValue(&quot;MaxUploadFileSize&quot;) * 1024 * 1024 + 400</p>
<p>If Request.TotalBytes &gt; nMaxUploadFileSize Then<br />
  Response.Write &quot;&lt;SCRIPT LANGUAGE=javascript&gt;alert('附件大小不能超过&quot; &amp; getParameterValue(&quot;MaxUploadFileSize&quot;) &amp; &quot;M字节!');history.back();&lt;/SCRIPT&gt;&quot;<br />
  Response.End<br />
  End if<br />
</p>
<p>%&gt;<br />
  &lt;%<br />
  Dim objUtility<br />
  Set objUtility = Server.CreateObject(&quot;AceCRM.Utility&quot;)<br />
  %&gt;<br />
  &lt;%</p>
<p>If objUtility.AddUploadFile(szCreatorTypeID,szCoObject,szCoObjectTypeID,vBinaryData,szConnStr,GetAttachmentDir(),BBSAttachment) Then<br />
  Else <br />
  writePageErrorInfo 1003,objUtility.GetLatestError<br />
  Response.End<br />
  End If</p>
<p>%&gt;<br />
  &lt;%<br />
  Set objUtility = Nothing<br />
  Set objCommon = Nothing<br />
  Set objConn = Nothing<br />
  %&gt;<br />
  &lt;%<br />
  If szisEdit = &quot;Yes&quot; Then<br />
  %&gt;<br />
  &lt;SCRIPT LANGUAGE=javascript&gt;<br />
  &lt;!-- <br />
  window.location.href = '../BBS/EditUploadFile.asp?LinkType=&lt;% =szLinkType%&gt;&amp;Uid=&lt;% = szUID %&gt;&amp;CoObject=&lt;%=szCoObject%&gt;&amp;CoObjectTypeID=&lt;%=szCoObjectTypeID%&gt;&amp;isEdit=&lt;%=szisEdit%&gt;' ;<br />
  //--&gt;<br />
  &lt;/SCRIPT&gt;<br />
  &lt;%<br />
  Else<br />
  %&gt;<br />
  &lt;SCRIPT LANGUAGE=javascript&gt;<br />
  &lt;!-- <br />
  window.location.href = '../BBS/AddUploadFile.asp?Uid=&lt;% = szUID %&gt;&amp;CoObject=&lt;%=szCoObject%&gt;&amp;CoObjectTypeID=&lt;%=szCoObjectTypeID%&gt;&amp;isEdit=&lt;%=szisEdit%&gt;';<br />
  //--&gt;<br />
  &lt;/SCRIPT&gt;<br />
  &lt;%<br />
  End If<br />
  %&gt;</p>
</body>
</html>
搜索更多相关主题的帖子: PUBLIC Object content html 
2012-10-31 14:35
快速回复:求助:上传不了文件
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020553 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved