注册 登录
编程论坛 ASP技术论坛

[讨论]aspSmartUpload组件的问题

yfzsj 发布于 2007-09-29 18:03, 393 次点击

我用ASP Studio 2005 做ASP的,在用aspSmartUpload的时候出现以下问题,

请帮下,有人遇过没?

ASP服务器发现运行时错误:
错 误 码:0x800A005B
错误代码:mySmartUpload.Upload
错误描述:Object variable or With block variable not set
文件名称:f:\jdcgl\manage\add_road_save.asp
所在行号:42

<%'---------------------------------------------------------------
' AspStudio_Codepage="936"
' 上面这行是软件使用的代码页标记,请不要删除。详情请参考帮助文件。
'
' 档案名称:add_road_save.asp
' 原创作者:ziyulei
' 作者邮件:
' 创建日期:星期六,2007年09月29日 15:49:07
' 版权所有(C)yfzsj
'--------------------------------------------------------------%>
<!--#include file="manage_conn.inc"-->
<HTML>
<HEAD>
<Title>add_road_save.asp</Title>
<META http-equiv="Content-Type" c>
<META name="Generator" c>

</HEAD>
<BODY>
<!-- 请在这里输入您的HTML代码 -->

<%
'请在这里输入您的ASP代码


' Variables
' *********
Dim mySmartUpload
Dim file


' Object creation
' ***************
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
' Upload
' ******
mySmartUpload.Upload '************************************************************this is 42 line

map=Request("map")

MyVar = now ' 系统时间.
builder=session("admin_name")

set rs=server.createobject("adodb.recordset")
rs.open "select * from road where (id_ is null)",conn,1,3

' Select each file
' ****************
For each file In mySmartUpload.Files
' Only if the file exist
' **********************
If not file.IsMissing Then
' Add the current file in a DB field
' **********************************
rs.addnew

file.FileToField rs.Fields("content_")
'rs("link_") = file.FileName
rs("map_")=map
rs("builder_")=session("admin_name")
rs("BUILD_")=MyVar
rs.update
End If
Next

rs.close
set rs=nothing
conn.close
set conn=nothing


response.write "<script language='javascript'>" & chr(13)
response.write "alert('数据添加成功!');" & Chr(13)
response.write "window.document.location.href='base_road.asp';"&Chr(13)

response.write "</script>" & Chr(13)
Response.Write("<script>window.opener.location.reload();</script>")
Response.End
%>

</BODY>
</HTML>

2 回复
#2
yfzsj2007-09-30 09:36
没人看下么?
#3
yfzsj2007-10-07 13:43
还是没人看,
1