CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 File upload using ADODB.Stream

Print topic Send  topic

Author Message
shinKL

Posts: 3
Posted: 09/05/2007, 1:37 AM

I've got

An error occured when uploading file specified in hn_pathfile into temporary folder. Error description: ADODB.Stream, Write to file failed..


Already trilple-checked with NTFS security setting.
All users (Everyone, IUSR, IWAM, etc,) as full control over it.


If I set the temporary folder to %TEMP, the file can be uploaded to %temp completely.
But directly after that, codecharge's system will move file to the place I specified during design time. (and that destination folder already has same Security Setting to full control for every *useraccount*) And the move operation will then always failed.


Note:
both %temp, destination folder (under c:\inetpub\wwwroot\ and c:\destfolder\)
already set to Full Control for All User Accounts.
Check in IIS6 Setting for that virtual Directory , already tick in "write" box.


this waste me 3 full days already,
does it related to CCS3.2 I'm using?

Next step for me if nobody help, I will get the backed up project in 3.1 and try it all over.:-D



Any Idea,?

Help?
Shinnapong K.
_________________
There is no limit whenever I develop anything.
----- www.KLNetwork.com ------
View profile  Send private message
ryan

Posts: 41
Posted: 10/07/2007, 9:22 PM

Hi :

You must use servermappath instead you have to override the generated filename.asp where it somewhat says

Set ReviewFileName = CCCreateFileUpload("ReviewFileName","","C:\Inetpub\wwwroot\1","C:\Inetpub\wwwroot\1","*","",10000000,True)

change C:\Inetpub\wwwroot\1 to server.mappath("\1\") or wherever you want them placed

also set IUSR_<machinename> with WRITE permission on that folder.

I also made tweaks on CCS generated classes.asp so that I want the exact filename as is not incrementing file1_date value.

on classes.asp line 1534
prefix = ""

somewhere within line 1549

Public Function GetOriginFileName(FileName)
Dim nPos
'®nPos = InStr(FileName,".")
'®If nPos > 0 Then
'® GetOriginFileName = Mid(FileName,nPos+1)
'®Else
GetOriginFileName = FileName
'®End If
End Function

And I commented out something in function validate

Function Validate()
Dim FieldName,oVarText
'If Required And CStr(VarText) = "" Then
' If Not CStr(Caption) = "" Then FieldName = Caption Else FieldName = Name
' Errors.addError("The file attachment in field " & FieldName & " is required.")
'End If
...the rest of CCS generated code

The thing is I wanted the browse file to show REQUIRED and not that annoying filename checkbox thing... I want the user to be able to upload ALWAYS so do some neat checking on the file if it exists an no file is to be uploaded use that ORIGINAL file instead

Thanks
_________________
(\__/)
(='.'=)
(")_(")
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.