skalag
02-08-2007, 09:58 PM
hi im using persits asp upload butr i have run into an error. I add data to database and upload images, but i have used basicaslly the same form for edit of that data and the same basic code to update the data as i use to add it. Adding gives no problem but updating gives this error. ive tried chopping and changing but i cant get by this.
error is:
-----------------------------------------------
Microsoft VBScript runtime error '800a01a8'
Object required: 'Upload.Files(...)'
-------------------------------------------------
To add files i have first asp page:
<form action="diaryaddprocess.asp" method="post" enctype="multipart/form-data" name="frmadd">
<input name="file1" type="file" size="35" />
<input name="txtDate" type="hidden" value="<%=TodayDate%>" />
</form>
And second asp page
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False
Upload.SetMaxSize 1048576 ' Limit files to 1MB
Count = Upload.SaveVirtual("/imagesupload/")
StrPic1 = Upload.Files("file1").filename
DatDate = Upload.Form("txtDate")
I use exactly the same for editing and updating the data but i get the above error. I cant see anything else wrong. obviously i have removed a lot of code from above example but i have also removed everything from the update process page except for this
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False
Count = Upload.SaveVirtual("/imagesupload/")
StrPic1 = Upload.Files("file1").filename
response.write StrPic1
i then get this error
---------------------------------------
Microsoft VBScript runtime error '800a01a8'
Object required: '[object]'
-------------------------------------------
im trying to figure out the change in error but im stuck, almost forgot the important bit - the images are being uploaded to the folder but i cant get the rest of the data. problem seems to be on this line :
StrPic1 = Upload.Files("file1").filename
error is:
-----------------------------------------------
Microsoft VBScript runtime error '800a01a8'
Object required: 'Upload.Files(...)'
-------------------------------------------------
To add files i have first asp page:
<form action="diaryaddprocess.asp" method="post" enctype="multipart/form-data" name="frmadd">
<input name="file1" type="file" size="35" />
<input name="txtDate" type="hidden" value="<%=TodayDate%>" />
</form>
And second asp page
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False
Upload.SetMaxSize 1048576 ' Limit files to 1MB
Count = Upload.SaveVirtual("/imagesupload/")
StrPic1 = Upload.Files("file1").filename
DatDate = Upload.Form("txtDate")
I use exactly the same for editing and updating the data but i get the above error. I cant see anything else wrong. obviously i have removed a lot of code from above example but i have also removed everything from the update process page except for this
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False
Count = Upload.SaveVirtual("/imagesupload/")
StrPic1 = Upload.Files("file1").filename
response.write StrPic1
i then get this error
---------------------------------------
Microsoft VBScript runtime error '800a01a8'
Object required: '[object]'
-------------------------------------------
im trying to figure out the change in error but im stuck, almost forgot the important bit - the images are being uploaded to the folder but i cant get the rest of the data. problem seems to be on this line :
StrPic1 = Upload.Files("file1").filename