Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2005, 07:16 AM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default aspSmartUpload error '800a0009'

hi there, please help me!!!!
************************************************** ****
aspSmartUpload error '800a0009'

Subscript out of range

/try/web/newsletter/newsAddProcess.asp, line 39 ************************************************** ********

so actually i have two pages. news-add.asp and newsaddprocess.asp
it was workin fine yesterday. i probably changed the code accidentally or somethin.. anyway..

code for newaddprocess.asp is below:
************************************************** ********




<%
' Check whether login name already exists
Function Duplicate_name(name)

   Dim rsdup, v_count, v_sql
   Set rsdup = Server.CreateObject("ADODB.Recordset")
   v_sql = "select * "
   v_sql = v_sql + " from newsletter "
   v_sql = v_sql + " where imgSrc = '" + name + "'"
   rsdup.Open v_sql, con, 1, 3
   if NOT rsdup.EOF then
      duplicate = false
   else
      duplicate = true
   end if
   rsdup.Close
   set rsdup = nothing
   Duplicate_name = duplicate
End Function
%>

<%
xemail=request.querystring("email")
set ors=server.createobject("ADODB.Recordset")
sql="select * from mailinglist where confirm= yes"
ors.open sql,con,1,3


Dim mailObj, subject, fromAddr, strFooter, strHeader, mailist
Dim mailbody

Dim mySmartUpload
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.Upload ----->line39

'send email
mailbody = "<h1>" & mySmartUpload.Form("heading") & "</h1>" & "</br></br>" & "<strong>" & mySmartUpload.Form("title1") & "</strong>" & "</br>" & mySmartUpload.Form("content1") & "</br>" & "***************************" & "</br>" & "<strong>" & mySmartUpload.Form("title2") & "</strong>" & "</br>" & mySmartUpload.Form("content2") & "</br>" & "***************************" & "</br>" & "<strong>" & mySmartUpload.Form("title3") & "</strong>" & "</br>" & mySmartUpload.Form("content3") & "</br>" & "***************************"
mailist = mySmartUpload.Form("receipients")
subject = "The Dance Connection Newsletter Issue#" & mySmartUpload.form("issueName")
fromAddr = """The Dance Connection"" <[email protected]> "
strHeader = "Click" & "<a href =""http://www.pilates-dance.com/try/web/newsletter.asp" & "Here</a>" & "to see online version<br/>"
strFooter = "<br /><br />If you would like to be removed from this mailing list - Click on the link below." & _
                "<br />Or Copy and Paste to your browsers address bar" & _
                "<br /><br /><a href=""http://www.pilates-dance.com/try/newsletter/common/nl-process.asp?cancel=now"">" & _
                "http://pilates-dance.com/try/newsletter/common/nl-process.asp?cancel=now</a><br /><br />" & _
                "Thanks<br />" & "The Dance Connection"

Set mailObj = Server.CreateObject("CDONTS.NewMail")
mailObj.BodyFormat = 0
mailObj.MailFormat = 0
mailObj.From = fromAddr
mailObj.Bcc = mailist
mailObj.Subject = subject
mailObj.Body = mailbody
mailObj.Send
Set mailObj = Nothing

'end if
%>




<%
' Variables
' *********
   'Dim mySmartUpload
   Dim item
   Dim value
   Dim filesize
   Dim file
   Dim image
   Dim xtoday
   Dim xdesc

'Variables for Email


' Object creation
' ***************
   'Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

' Upload
' ******
   'mySmartUpload.Upload

' FILES Collection
' ****************
   file=mySmartUpload.files.item(1).filename
   issue=mySmartUpload.Form("issueName")
   heading=mySmartUpload.Form("heading")
   title1=mySmartUpload.Form("title1")
   title2=mySmartUpload.Form("title2")
   title3=mySmartUpload.Form("title3")
   content1=mySmartUpload.Form("content1")
   content2=mySmartUpload.Form("content2")
   content3=mySmartUpload.Form("content3")
   imgCap=mySmartUpload.Form("imgCaption")
   imgTxt=mySmartUpload.Form("img_txt")
   addInfo=mySmartUpload.Form("add_info")
   xtoday=mySmartUpload.Form("timedate")

   xissue = Replace(issue, "'", "??")
   xheading = Replace(heading, "'", "??")
   xtitle1 = Replace(title1, "'", "??")
   xtitle2 = Replace(title2, "'", "??")
   xtitle3 = Replace(title3, "'", "??")

   xcontent1 = Replace(Replace(content1, "'", "??"),vbcrlf, "<br>")
   xcontent2 = Replace(Replace(content2, "'", "??"),vbcrlf, "<br>")
   xcontent3 = Replace(Replace(content3, "'", "??"),vbcrlf, "<br>")
   ximgCap = Replace(Replace(imgCap, "'", "??"),vbcrlf, "<br>")
   ximgTxt = Replace(Replace(imgTxt, "'", "??"),vbcrlf, "<br>")
   xaddInfo = Replace(Replace(addInfo, "'", "??"),vbcrlf, "<br>")
' Check wheter file name already exist and the filesize
' ************************************************** ****
filesize=formatnumber((mySmartUpload.Files.TotalBy tes)/1000,0)

if trim(file)<>"" then
  if not duplicate_name(file)then
    response.redirect "instructorAdd.asp?error=1&name=" & file
  else
' Save the files with their original names in a virtual path of the web server
' ************************************************** **************************
   intCount = mySmartUpload.Save("../admin/image")

' Database
' ********
mstr="insert into newsletter(IssueNo, Heading, imgSrc, Title1, Title2 , Title3 , Content1, Content2, Content3, imgCaption, imgContent, extraInfo, DateEntered )"
mstr=mstr+ " values('"& xissue&"', '"& xheading&"', '"& file&"', '"& xtitle1&"', '"& xtitle2&"', '"& xtitle3&"', '"& xcontent1&"', '"& xcontent2&"', '"& xcontent3&"', '"& ximgCap&"', '"& ximgTxt&"', '"& xaddInfo&"', '"& xtoday&"')"
  end if
else
mstr="insert into newsletter(IssueNo, Heading, imgSrc, Title1, Title2 , Title3 , Content1, Content2, Content3, imgCaption, imgContent, extraInfo, DateEntered )"
mstr=mstr+ " values('"& xissue&"', '"& xheading&"', '"& file&"', '"& xtitle1&"', '"& xtitle2&"', '"& xtitle3&"', '"& xcontent1&"', '"& xcontent2&"', '"& xcontent3&"', '"& ximgCap&"', '"& ximgTxt&"', '"& xaddInfo&"', '"& xtoday&"')"
end if
'response.write(mstr)



con.execute(mstr)
con.close
set con=nothing
response.redirect("newsletter2.asp")

%>
 
Old March 23rd, 2005, 07:47 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

This error occurs when the asp is directly executed instead of being called from an HTML form with an ENCTYPE="multipart/form-data" tag.

Gokulan Ethiraj
 
Old March 23rd, 2005, 08:00 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Cannot use Request.Form collection after calling BinaryRead. also refer to ....


http://www.gamedev.net/community/for...opic_id=256164

Gokulan Ethiraj
 
Old March 23rd, 2005, 10:37 AM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey.. know what? i think i'm dumb.

i kept previewing the process page, and not the main page... THAT'S WHY!!!!!

*dumb





Similar Threads
Thread Thread Starter Forum Replies Last Post
invalid class (aspsmartupload) arabuafef Classic ASP Basics 4 January 9th, 2007 03:28 PM
File Download Problem with AspSmartUpload componen mlbrv Classic ASP Components 0 December 4th, 2006 06:48 AM
runtime error 800a0009 on calendar mg1966 Classic ASP Databases 0 February 2nd, 2005 09:23 PM
ASPSmartUpload doesn't save files jcalmeida Classic ASP Basics 4 August 23rd, 2004 04:20 AM
ASPSmartUpload lian_a Classic ASP Basics 13 May 13th, 2004 03:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.