ADODB. Stream error ' 800A0BBC ' writing to file failed

Source: Internet
Author: User

Recently debugging a past project, ASP write a non-group upload class, previously tested passed, this release is prompt:

The system on which this error occurs is: Windows Server R2

Some may also hint: ADODB.stream error 30004

Start thinking is the issue of permissions, so set the permissions of the folder, and even give everyone full control of the permissions, the result is still not working;

Related error code line:

Stream. SaveToFile FileName, 2
Output file path:

Response.Write "<br/>filename=" & FileName

The specified save directory:

Folderpath=c:\inetpub\wwwroot\uploadclass_dreacom_v3\demo1\uploadfile

Temporary File Save location:
Filename=c:\inetpub\wwwroot\uploadclass_dreacom_v3\demo1\uploadfile\2015\10\2851107108ad_0.tmp
Through the path can be found, a few more layers of directory, what is this?

This involves the following functions:

Public Function Getnewuploadid () Dim Dtstrdtstr = Replace (CStr (Date ()), "-", "") & CStr (CLng (Timer () *1000)) Getnewuploadid = dtstr & Getrandomcode (20-len (DTSTR)) End Function
Usually we get the data format CStr (Date ()): 2015-10-28, the middle separator is a minus sign, and inWindows Server R2 obtained the format is 2015/10/28, when executing Server.MapPath, it is treated as a directory, because the corresponding directory does not exist, so this problem is caused.

Find out the reason, the solution is naturally clear, the date of the "/" also replace it can be.



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

ADODB. Stream error ' 800A0BBC ' writing to file failed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.