繁体中文
设为首页
加入收藏
当前位置:ASP技术首页 >> ASP基础 >> 把文件存进access数据库然后取出来供人下载的代码(取自e-office部分模块)

把文件存进access数据库然后取出来供人下载的代码(取自e-office部分模块)

2006-04-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:senddate.ASP(发送界面) 发给:* 标题: * 内容: 附件: (不能超过100K) ************************************************************************* senddateindb.ASP(把要发送的文件保存到数据库) 企业管理系...

senddate.ASP(发送界面)

发给:*

标题:

*

内容:

附件:

(不能超过100K)

*************************************************************************

senddateindb.ASP(把要发送的文件保存到数据库)

企业管理系统

公文发送

0 then

sendtoinflen=len(sendtoinf)

recipientusername=right(sendtoinf,sendtoinflen-userdeptpoint)

if recipientusername="所有人" then

recipientusername="所有人"

else

usernamepoint=Instr(recipientusername,"(")

usernamelen=len(recipientusername)

recipientusername=left(recipientusername,usernamelen-1)

recipientusername=right(recipientusername,usernamelen-1-usernamepoint)

end if

recipientuserdept=left(sendtoinf,userdeptpoint-1)

set conn=opendb("oabusy","conn","accessdsn")

set rs=server.createobject("ADODB.recordset")

sql = "select * from senddate"

rs.Open sql,conn,1,3

rs.addnew

rs("title")=title

rs("content")=content

rs("sender")=oabusyusername

rs("recipientusername")=recipientusername

rs("recipientuserdept")=recipientuserdept

if filename"" then

rs("filename")=filename

rs("fileContentType")=fileContentType

rs("filevalue").appendchunk filevalue

end if

rs.update

rs.close

set rs=nothing

set conn=nothing

end if

next

%>

发送完成

*****************************************************************

listsendfile.ASP (把数据库里面的文件取出来并下载,如果是文本或图像会直接打开)

责任编辑:admin
相关文章