[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1386
  • Last Modified:

multiple file upload

Here is my code, I keep getting this error:



Request object error 'ASP 0206 : 80004005'

Cannot call BinaryRead

/intranet/clsUpload.asp, line 85

Cannot call BinaryRead after using Request.Form collection.



Any Ideas? I need to finish this quickly.









<!--#INCLUDE FILE="clsUpload.asp"-->

<%
'sID = Request("id")
sPic = Request("file") 'thumbnail
sBigPic = Request("file2") 'big image
sF1 = Request("sImage1")
sF2 = Request("sImage2")
sF3 = Request("sImage3")
sF4 = Request("sImage4")
sF5 = Request("sImage5")
sF5 = Request("sImage6")
sTitle = Request("textfield")
sAPrice = Request("textfield2")
sDesc = Request("textarea")

Response.write "entering the ****<BR>variables are:<BR>"

response.write spIC &  "<BR>"
response.write sBigPic & "<BR>"
response.write sF1 &  "<BR>"
response.write sF2 &  "<BR>"
response.write sF3 &  "<BR>"
response.write sF4 &  "<BR>"
response.write sF5 &  "<BR>"
response.write sF6 &  "<BR>"
response.write sTitle &  "<BR>"
response.write sAPrice &  "<BR>"
response.write sDesc & "<BR>"

'Upload Primary Displayed Image

      Dim objUpload
      Dim strFileName
      Dim strPath


      Set objUpload = New clsUpload
      strFileName = objUpload.Fields("sPic").FileName
      strPath = Server.MapPath("Pictures") & "\" & strFileName
      objUpload("sPic").SaveAs strPath
      Set objUpload = Nothing

'Upload Primary Large Image


      Set objUpload2 = New clsUpload
      strFileName = objUpload2.Fields("sBigPic").FileName
      strPath = Server.MapPath("Pictures") & "\" & strFileName
      objUpload2("sBigPic").SaveAs strPath
      Set objUpload2 = Nothing


If len(sF1) <> 0 then

      Set objUpload = New clsUpload
      strFileName = objUpload.Fields("sF1").FileName
      strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
      objUpload("sF1").SaveAs strPath

      Set objUpload = Nothing


            sImages = strPath

elseif len(sF2) <> 0 Then
      Set objUpload = New clsUpload
      strFileName = objUpload.Fields("sF2").FileName
      strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
      objUpload("sF2").SaveAs strPath

      Set objUpload = Nothing

      'saving file names      
      if len(sImages) = 0 then
            sImages = strPath
      else
            sImages = sImages & "," & strPath
      end If
elseif len(sF3) <> 0 Then
      Set objUpload = New clsUpload
      strFileName = objUpload.Fields("sF3").FileName
      strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
      objUpload("sF3").SaveAs strPath

      Set objUpload = Nothing

      'saving file names      
      if len(sImages) = 0 then
            sImages = strPath
      else
            sImages = sImages & "," & strPath
      end If
elseif len(sF4) <> 0 Then
response.write "data: " & sf4
      Set objUpload = New clsUpload
      strFileName = objUpload.Fields("sF4").FileName
      strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
      objUpload("sF4").SaveAs strPath

      Set objUpload = Nothing

      'saving file names      
      if len(sImages) = 0 then
            sImages = strPath
      else
            sImages = sImages & "," & strPath
      end If
elseif len(sF5) <> 0 Then
      Set objUpload = New clsUpload
      strFileName = objUpload.Fields("sF5").FileName
      strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
      objUpload("sF5").SaveAs strPath

      Set objUpload = Nothing

      'saving file names      
      if len(sImages) = 0 then
            sImages = strPath
      else
            sImages = sImages & "," & strPath
      end If
elseif len(sF6) <> 0 Then
      Set objUpload = New clsUpload
      strFileName = objUpload.Fields("sF6").FileName
      strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
      objUpload("sF6").SaveAs strPath

      Set objUpload = Nothing

      'saving file names      
      if len(sImages) = 0 then
            sImages = strPath
      else
            sImages = sImages & "," & strPath
      end If

End If

Dim DB_CONNECTIONSTRING

DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath(".../inventory.mdb") & ";"      

      Set objRecordset = Server.CreateObject("ADODB.Recordset")
      objRecordset.Open "tblForum", DB_CONNECTIONSTRING, 1,3
      objRecordset.CacheSize = 15 ' Cuts down on round trips to our SQL Server
      objRecordset.AddNew      
      
      objRecordset.Fields("picture") =  "intranet\pictures\subpics\" & strFileName
      objRecordset.Fields("picturethumbnail") =  "intranet\pictures\subpics\" & strFileName
      objRecordset.Fields("title") =  sTitle
      objRecordset.Fields("description") =  sDesc
      objRecordset.Fields("aprice") =  sAprice
      objRecordset.Fields("sImage") = sImages


      objRecordset.Update
      objRecordset.Close
      Set objRecordset = Nothing



   
Dim strCameFrom
strCameFrom=Request.ServerVariables("HTTP_REFERER")
Response.Redirect(strCameFrom)
%>
0
poweraddict
Asked:
poweraddict
  • 21
  • 12
  • 8
  • +1
1 Solution
 
jmelikaCommented:
0
 
fritz_the_blankCommented:
One you are using an upload component, you can no longer use Request.Form() or else you will receive errors. The good news is that most upload components provide you with a replacement.

FtB
0
 
fritz_the_blankCommented:
I would tell you what that replacement is, but I can't tell what upload component you are using. Chances are, however, that instead of:

Request.Form("YourField")

it will be:

objUpload.Fields("YourField")

FtB
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
poweraddictAuthor Commented:
jmelika, I tried that, still doesn't work.

I don't get errors on one file using request, but I do on the multiple files. I dont know a replacement for this component though.

Any suggestions, I need to get this working within 1 hour....
0
 
fritz_the_blankCommented:
Did you see my comment?

BTW, if you are looking for replacements, here you go:

http://www.taka.nl/programming/asp/comparing_fileupload.asp

FtB
0
 
fritz_the_blankCommented:
In any event, I suspect that if you remove the following lines, your code may work:

sPic = Request("file") 'thumbnail
sBigPic = Request("file2") 'big image
sF1 = Request("sImage1")
sF2 = Request("sImage2")
sF3 = Request("sImage3")
sF4 = Request("sImage4")
sF5 = Request("sImage5")
sF5 = Request("sImage6")
sTitle = Request("textfield")
sAPrice = Request("textfield2")
sDesc = Request("textarea")



FtB
0
 
poweraddictAuthor Commented:
fritz, if i remove those lines, how will the code know what path and files to upload?
0
 
fritz_the_blankCommented:
Which brings me back to my other point: you can't use an upload script and request() or request.form()

I suspect that the syntax will be something like this:

sAPrice = objUpload.Fields("textfield2")

but I don't know for certain because I don't know what script you are using.

FtB
0
 
fritz_the_blankCommented:
If that doesn't work, try:

sAPrice = objUpload("textfield2")


In either case, however, you need to do this after you create your upload object.


FtB
0
 
fritz_the_blankCommented:
Just as an aside, are you sure that you can't just use one instance of this object to upload multiple files?

FtB
0
 
fritz_the_blankCommented:
Here is my best guess:

<!--#INCLUDE FILE="clsUpload.asp"-->

<%

'Upload Primary Displayed Image

     Dim objUpload
     Dim strFileName
     Dim strPath


     Set objUpload = New clsUpload
     strFileName = objUpload.Fields("sPic").FileName
     strPath = Server.MapPath("Pictures") & "\" & strFileName
     objUpload("sPic").SaveAs strPath

'Upload Primary Large Image

     strFileName = objUpload.Fields("sBigPic").FileName
     strPath = Server.MapPath("Pictures") & "\" & strFileName
     objUpload("sBigPic").SaveAs strPath

sPic = objUpload("file") 'thumbnail
sBigPic = objUpload("file2") 'big image
sF1 = objUpload("sImage1")
sF2 = objUpload("sImage2")
sF3 = objUpload("sImage3")
sF4 = objUpload("sImage4")
sF5 = objUpload("sImage5")
sF5 = objUpload("sImage6")
sTitle = objUpload("textfield")
sAPrice = objUpload("textfield2")
sDesc = objUpload("textarea")

If len(sF1) <> 0 then

     strFileName = objUpload.Fields("sF1").FileName
     strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
     objUpload("sF1").SaveAs strPath
      sImages = strPath

elseif len(sF2) <> 0 Then
     strFileName = objUpload.Fields("sF2").FileName
     strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
     objUpload("sF2").SaveAs strPath

     'saving file names    
     if len(sImages) = 0 then
          sImages = strPath
     else
          sImages = sImages & "," & strPath
     end If
elseif len(sF3) <> 0 Then
     strFileName = objUpload.Fields("sF3").FileName
     strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
     objUpload("sF3").SaveAs strPath

     'saving file names    
     if len(sImages) = 0 then
          sImages = strPath
     else
          sImages = sImages & "," & strPath
     end If
elseif len(sF4) <> 0 Then
response.write "data: " & sf4
     strFileName = objUpload.Fields("sF4").FileName
     strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
     objUpload("sF4").SaveAs strPath

     'saving file names    
     if len(sImages) = 0 then
          sImages = strPath
     else
          sImages = sImages & "," & strPath
     end If
elseif len(sF5) <> 0 Then
     strFileName = objUpload.Fields("sF5").FileName
     strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
     objUpload("sF5").SaveAs strPath

     'saving file names    
     if len(sImages) = 0 then
          sImages = strPath
     else
          sImages = sImages & "," & strPath
     end If
elseif len(sF6) <> 0 Then
     strFileName = objUpload.Fields("sF6").FileName
     strPath = Server.MapPath("Pictures") & "\subpics\" & strFileName
     objUpload("sF6").SaveAs strPath
     'saving file names    
     if len(sImages) = 0 then
          sImages = strPath
     else
          sImages = sImages & "," & strPath
     end If

End If

Dim DB_CONNECTIONSTRING

DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath(".../inventory.mdb") & ";"    

     Set objRecordset = Server.CreateObject("ADODB.Recordset")
     objRecordset.Open "tblForum", DB_CONNECTIONSTRING, 1,3
     objRecordset.CacheSize = 15 ' Cuts down on round trips to our SQL Server
     objRecordset.AddNew    
     
     objRecordset.Fields("picture") =  "intranet\pictures\subpics\" & strFileName
     objRecordset.Fields("picturethumbnail") =  "intranet\pictures\subpics\" & strFileName
     objRecordset.Fields("title") =  sTitle
     objRecordset.Fields("description") =  sDesc
     objRecordset.Fields("aprice") =  sAprice
     objRecordset.Fields("sImage") = sImages


     objRecordset.Update
     objRecordset.Close
     Set objRecordset = Nothing

Dim strCameFrom
strCameFrom=Request.ServerVariables("HTTP_REFERER")
Response.Redirect(strCameFrom)
%>



FtB
0
 
poweraddictAuthor Commented:
that doesnt work, it tries to upload null now...
0
 
fritz_the_blankCommented:
null for what field, can you tell?

Also, can you tell me what code you are using?

FtB
0
 
fritz_the_blankCommented:
Okay, I think that I know what you are using now.


Instead of:

sDesc = Request("textarea")

you need to do:

sDesc = objUpload.Fields("textarea")

FtB
0
 
poweraddictAuthor Commented:
object required....


here is the component source, this is where i got my code from:


http://www.structtech.com/code.zip
0
 
fritz_the_blankCommented:
I could use some more information--what is the exact code that you are using now and what is the line number? I can't duplicate your environment here.

FtB
0
 
poweraddictAuthor Commented:
Here is the code where a user can upload the files:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Add Inventory Item</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="13%"><strong><font size="2" face="Tahoma">Title:</font></strong></td>
    <td width="87%"><form name="form1" method="post" action="addaction.asp">
        <input name="textfield" type="text" size="36">
      </td>
  </tr>
  <tr>
    <td><strong><font size="2" face="Tahoma">Primary Image Thumbnail:</font></strong></td>
    <td><input type="file" name="file"></td>
  </tr>
  <tr>
    <td><strong><font size="2" face="Tahoma">Primary Image Default:</font></strong></td>
    <td><input type="file" name="file2"></td>
  </tr>
  <tr>
    <td><strong><font size="2" face="Tahoma">Asking Price:</font></strong></td>
    <td><input name="textfield2" type="text" size="36"></td>
  </tr>
  <tr>
    <td height="144"><strong><font size="2" face="Tahoma">Description:</font></strong></td>
    <td><textarea name="textarea" cols="40" rows="10"></textarea></td>
  </tr>
  <tr>
    <td height="220"><strong><font size="2" face="Tahoma">Sub Images:</font></strong></td>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><input name="sImage1" type="file" id="sImage1"></td>
        </tr>
        <tr>
          <td><input name="sImage2" type="file" id="sImage2"></td>
        </tr>
        <tr>
          <td><input name="sImage3" type="file" id="sImage3"></td>
        </tr>
        <tr>
          <td><input name="sImage4" type="file" id="sImage4"></td>
        </tr>
        <tr>
          <td><input name="sImage5" type="file" id="sImage5"></td>
        </tr>
        <tr>
          <td><input name="sImage6" type="file" id="sImage6"></td>
        </tr>
      </table>
     
    </td>
  </tr>
          <tr>
          <td><input type="submit"></form></td>
        </tr>
</table>
</body>
</html>
0
 
poweraddictAuthor Commented:
Wow, thank God I got the meeting postponed until tom. morning.

Ok Guys, I just posted the code above, then it goes to the code I posted in the first post.
0
 
fritz_the_blankCommented:
I may be wrong, but I think that you are using the wrong form type:


<form name="form1" method="post" action="addaction.asp">


I think that this needs to be:

<form name="form1" method="post" action="addaction.asp" encType="multipart/form-data">



That would explain the null values.

FtB


0
 
poweraddictAuthor Commented:
It would always be null since there isn't anything requesting the textfields and filefields.
0
 
fritz_the_blankCommented:
Now you have lost me completely.

I would like to make a suggestion since you have a little more breathing time.

I imagine that the code has a sample form that you can use with a sample process page? Why don't you start with that to see if you can get it to work. Once you do, then you can start to modify it  to meet your needs.

In any event, I have never seen this work without the encType="multipart/form-data" of the form tag,

FtB
0
 
_Stilgar_Commented:
sup fritz

Please view the following class - implementing it and using it even for multiple files is extremely easy.
http://www.aspemporium.com/   <-- Search for  FileUpload Object v2.6

Stilgar.
0
 
fritz_the_blankCommented:
In the link that I gave above, you can see a comparison of all of the commonly used scripts:


http://www.taka.nl/programming/asp/comparing_fileupload.asp

It also compares features and performance.

In any event, the missing attribute of the form tag must be fixed.

FtB
0
 
_Stilgar_Commented:
Oh, and fritz is right - no chance you will get it to work without that enctype in the <form> tag. (Was just catching up now).
0
 
fritz_the_blankCommented:
@Stilgar--

BTW, how have you been? Hoping that all is well with you,

FtB
0
 
_Stilgar_Commented:
@FtB

Got some work pressure for a while, everything should be calm now, thanks. How is it with you?

Stilgar.
0
 
fritz_the_blankCommented:
At this time of the semester? Pure Hell!!!!

I can't wait for the holidays.

See you about,

ftB
0
 
_Stilgar_Commented:
Times in Israel do differ :)

Latez, bedtime,

Stilgar.
0
 
poweraddictAuthor Commented:
I added encType="multipart/form-data"

now I dont get the same error, now im getting a:


Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument: 'MidB'

/intranet/clsUpload.asp, line 102



0
 
_Stilgar_Commented:
Well, in the code you posted there is no use of that function, so check where it is and post the line, along with line 102.
0
 
poweraddictAuthor Commented:
<H1>File Upload</H1>

<H2>To File System</H2>
<FORM method="post" encType="multipart/form-data" action="ToFileSystem.asp">
      File Name: <INPUT type="File" name="File1"><BR>
      Description: <INPUT type="textfield" name="textfield"><br>
      <INPUT type="Submit" value="Upload">
</FORM>




The encType line doesn't send the textfield value now; is there a way I could make it send the value? It would be like sending two forms with one button. Not sure what to do here either, just another snag..
0
 
fritz_the_blankCommented:
Okay, I know I said it above, but I'll say it again. Once you use the upload object, you will have to use the upload object not only to upload your file, but also to grab the values from your form. That is because Request.form() or request() on its own will no longer function. If you take a look at the samples that came with the code, that should tell you how to do this. Also, I suspect that you can get the values like this:

sSomeString = objUpload.Fields("textfield")

FtB
0
 
fritz_the_blankCommented:
So, once you figure out the syntax, you will be able to upload the file and access the field values all within one form.

FtB
0
 
poweraddictAuthor Commented:
wow im confused on this
0
 
_Stilgar_Commented:
...or just move to a good documented upload class.

Stilgar.
0
 
_Stilgar_Commented:
Now, I took that code snippet from the cls file header. Use it to list of all fields passed, and make sure the text fields are being sent along with the binary one:

      For i = 0 To objUpload.Count - 1
            Response.Write objUpload(i).Name & "<BR>"
      Next

And, I'm 100% sure that if you'd try to access the text field using the following syntax it will work very nicely:

sSomeString = objUpload.Fields("textfield").Value

Once again, this all was concluded by READING the class file header. Please try this before you reply.

Stilgar.
0
 
fritz_the_blankCommented:
I posted the same thing above--my understanding that the default is value, so:

sSomeString = objUpload.Fields("textfield").Value

and:

sSomeString = objUpload.Fields("textfield")

are synonymous.

I am trying to help, I really am,  but it doesn't appear that PowerAddict wants to follow what I am suggesting. So, unless s/he has a change of mind, I don't know what more that I can do.

To review:

1) there are samples included in the code. Try setting those up to make sure that they work in the environment
2) once you get the samples working, modify them a step at a time until you get what you need
3) you must have encType="multipart/form-data" in your form tag
4) you cannont use Request.Form() or request() when you upload files
5) instead of Request.Form() or Request() yoou need to use: objUpload.Fields()

FtB


0
 
poweraddictAuthor Commented:
<% @ Language = VBScript CodePage = 1252  %>
<%

With Response
      .Buffer = True
      .Expires = 0
      .Clear
End With
%>

<!-- #INCLUDE FILE = "./cls_fileupload.asp" -->

<%

Dim oFO, oProps, oFile, i, item, oMyName


Set oFO = New FileUpload


Response.Write("<H3>FileUpload Object v" & oFO.Version & "</H3>")


Set oProps = oFO.GetUploadSettings
with oProps



      .Extensions = Array("txt", "jpg", "zip", "xls", "doc", "exe", "gif", "tif", "jpeg")
      .UploadDirectory = Server.Mappath("../uploads/")
      .AllowOverWrite = true
      .MaximumFileSize = 9999999999999999999999999999999000000000099999999999999999999999999999999999999999999999999988135000
      .MininumFileSize = 10000 ' 10k
      .UploadDisabled = false
End with

 
set oProps = nothing


oFO.ProcessUpload

 
if oFO.TotalFormCount > 0 then

      
      if oFO.FileCount > 0 then

'----------------------------------------------upload picture thumbnail

      set oFile = oFO.File(1)
                  response.write "<HR><B>file #" & ofile.filename & "</B><HR>"
            
                  if oFile.ErrorMessage <> "" then
                        response.write "&gt; An error occurred uploading a file: " & _
                              oFile.ErrorMessage & "<BR>"
                  else

                        
                        oFile.SaveAsFile
                  end if
pTDir = "intranet\pictures\" & oFile.FileName
      set oFile = Nothing


'----------------------------------------------
'---------------------------------------------upload picture full version

      set oFile = oFO.File(2)
                  response.write "<HR><B>file #" & ofile.filename & "</B><HR>"
            
                  if oFile.ErrorMessage <> "" then
                        response.write "&gt; An error occurred uploading a file: " & _
                              oFile.ErrorMessage & "<BR>"
                  else

                        
                        oFile.SaveAsFile
                  end if
      
pDir = "intranet\pictures\" & oFile.FileName
set oFile = Nothing

'---------------------------------------------
'---------------------------------------------      'upload sub pictures
            for i = 3 to oFO.FileCount


                  
                  set oFile = oFO.File(i)
'response.write "intranet\pictures\" & oFile(i).FileName
                  response.write "<HR><B>file #" & i & "</B><HR>"

                  
                  if oFile.ErrorMessage <> "" then
                        response.write "&gt; An error occurred uploading a file: " & _
                              oFile.ErrorMessage & "<BR>"
                  else

                        
                        oFile.SaveAsFile

                         
                        if oFile.UploadSuccessful then
                              response.write "&gt; file uploaded successfully<BR>"

                              

                              response.write(" - absolute path to file: " & _
                                    oFile.AbsolutePath & "<BR>")

                              response.write(" - virtual path to file: " & _
                                    oFile.VirtualPath & "<BR>")

                              response.write(" - fully qualified URL path to file: " & _
                                    oFile.URLPath & "<BR>")

                              response.write(" - content-type: " & oFile.ContentType & "<BR>")
                              response.write(" - file name: " & oFile.FileName & "<BR>")
                              response.write(" - file size: " & _
                                    formatnumber(oFile.ByteCount, 0) & " bytes<BR>")
                        else
                              response.write "&gt; An error occurred saving file to disk: " & _
                                    oFile.ErrorMessage & "<BR>"
                        end if
                  DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath(".../inventory.mdb") & ";"      

      Set objRecordset = Server.CreateObject("ADODB.Recordset")
      objRecordset.Open "tblInventory", DB_CONNECTIONSTRING, 1,3
      objRecordset.CacheSize = 15 ' Cuts down on round trips to our SQL Server
      objRecordset.AddNew      
      objRecordset.Fields("picturethumbnail") =  pTDir
      objRecordset.Fields("picture") =  pDir
      objRecordset.Fields("title") =  oFO.Form("textfield")
      objRecordset.Fields("description") =  oFO.Form("textarea")
      objRecordset.Fields("aprice") =  oFO.Form("textfield2")
if len(objRecordset.Fields("sImage")) = 0 then
      objRecordset.Fields("sImage") = oFile(i).FileName
else
      objRecordset.Fields("sImage") = sImage & "," & oFile(i).FileName
end if


      objRecordset.Update
      objRecordset.Close
      Set objRecordset = Nothing
end if


            
                  set oFile = Nothing

            next
      else

             
            response.write "&gt; no binary file content submitted."
      end if

      
      if oFO.FormCount > 0 then

            if isarray(oFO.Inputs) then

                  
                  for each item in oFO.Inputs
                        response.write "<HR><B>form input """ & item & """</B><HR>"
                        response.write " - value : " & oFO.Form(item) & "<BR>"
                  next
            end if

      end if

      
      response.write "<BR><BR><A HREF=""" & _
            request.servervariables("SCRIPT_NAME") & """>upload again</A>"
else

      
      oFO.ShowUploadForm request.servervariables("SCRIPT_NAME")
end if

'release FileUpload object to save memory.
set oFO = Nothing
%>
0
 
poweraddictAuthor Commented:
thats the code I have now, used asp emporium...

iim pretty sure it works now, still working on it
0
 
_Stilgar_Commented:
I use asp emporium very often, and it works great. You should not have any problems with it as long as you stick to the examples.

@FtB --
sSomeString = objUpload.Fields("textfield") and sSomeString = objUpload.Fields("textfield").value are not necessarily synonymous, as rs("field") and rs("field").value aren't. It realy depands on the class/object definitions, but I'm most certain they are not synonymous. Although rs("field") returns the value of the field on response.write, it is an object, and if you'll add it to a dictionary and close the rs object your code will error. On the other side, using rs("field").value won't cause that "object required" error.

Stilgar.
0
 
fritz_the_blankCommented:
I don't know for certain as I haven't tried it, but that is what the comments in the code said when I looked at the script.

FtB
0
 
fritz_the_blankCommented:
This is the correct answer:

ID: 12575836


However, others put effort into this beyond the problem stated in the question.

FtB
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 21
  • 12
  • 8
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now