Using ASPUpload cant recognize file.binary

Results 1 to 2 of 2

Thread: Using ASPUpload cant recognize file.binary

  1. #1
    Join Date
    Dec 1969

    Default Using ASPUpload cant recognize file.binary

    Hello,<BR>This is my code that I am using with the COM component of ASP upload:<BR><BR>&#060;% <BR>Set Upload = Server.CreateObject("Persits.Upload.1")<BR>Count = Upload.Save("c:upload") <BR><BR>Set Conn = Server.CreateObject("ADODB.connection")<BR>conn.op en "DSN=AdultMatch; uid=xxx; pwd=xxx"<BR>userID = "100803133339542"<BR>Set File = Upload.Files("THEFILE")<BR>Hash = File.MD5Hash<BR> mySQL = "EXECUTE sproc_uploadpictures &#039;" & File.Binary & "&#039;,&#039;" & File.Filename & "&#039;,&#039;" & File.Size & "&#039;,&#039;"<BR> mySQL = mySQL & Replace(Upload.Form("DESCR1"), "&#039;", "&#039;&#039;") & "&#039;,&#039;" & Hash & "&#039;,&#039;" & userID & "&#039;"<BR><BR>Set ORs = Conn.Execute(mySQL)<BR>Response.write Ors("messsage")<BR>%&#062; <BR><BR>Now I get an error from ASP telling me the following:<BR><BR>Error Type:<BR>Microsoft VBScript runtime (0x800A000D)<BR>Type mismatch<BR>/match/pictures/uploadprocess3.asp, line 10<BR><BR><BR>This is pointing to the file.binary command. Shouldnt this be the image link? Why doesnt it work? I have read in their manuals that this works however I get an error when I use it, what am I doing wrong.<BR><BR>Thanks in Advance<BR>Mike M

  2. #2
    Join Date
    Dec 1969

    Default RE: Using ASPUpload cant recognize file.binary

    I think that to use the Binary property of the UploadedFile object, you need to assign it as follows,<BR><BR>rs("image_blob_field").Value = File.Binary<BR><BR>Here are more examples,<BR><BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts