email problem with asp upload (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


dschmuecker -> email problem with asp upload (1/20/2008 16:57:42)

I'm getting this error message when trying to send an email with an asp insert file upload script to an access database.

Cannot use Request.Form collection after calling BinaryRead.

Here's the insert file. Search Dim myMail to find the email script.

<%
	Response.Buffer = True
	' load object
	Dim load
		Set load = new Loader
				' calling initialize method
		load.initialize
			' File binary data
	Dim fileData
		fileData = load.getFileData("file")
	' File name
	Dim fileName
		fileName = LCase(load.getFileName("file"))
	' File path
	Dim filePath
		filePath = load.getFilePath("file")
	' File path complete
	Dim filePathComplete
		filePathComplete = load.getFilePathComplete("file")
	' File size
	Dim fileSize
		fileSize = load.getFileSize("file")
	' File size translated
	Dim fileSizeTranslated
		fileSizeTranslated = load.getFileSizeTranslated("file")
	' Content Type
	Dim contentType
		contentType = load.getContentType("file")
	' No. of Form elements
	Dim countElements
		countElements = load.Count
	
	Dim user_name
		user_name= load.getValue("user_name")
		
			Dim email
		email= load.getValue("email")
		
			Dim phone
		phone= load.getValue("phone")
				
	
	
	Dim department
		department= load.getValue("department")
		
	Dim width
		width= load.getValue("width")
		

	
	Dim length
	
		length= load.getValue("length")
		
			Dim quanitity
	quanitity= load.getValue("quanitity")
			Dim duedate0
	duedate0= load.getValue("duedate0")
	
	
				Dim directions
	directions= load.getValue("directions")
           
	Dim pathToFile
		pathToFile = Server.mapPath("/gallery/currentevents/") & "\" & fileName
			
		' Uploading file data
	Dim fileUploaded
		fileUploaded = load.saveToFile ("file", pathToFile)
				' destroying load object
	Set load = Nothing	
%>

<html>
<head>
	<title>File Uploading with ASP</title>
    <style>
		body, input, td { font-family:verdana,arial; font-size:10pt; }
	</style>
</head>
<body>
    <p align="center">
		<b>File Uploading with ASP</b>
	</p>
	
	<table width="700" border="1" align="center">
	<tr>
		<td>File Name</td><td><%= fileName %></td>
	</tr><tr>
		<td>Imgpath</td><td><%= imgpath %></td>
	</tr>
	<tr>
		<td>File Path</td><td><%= filePath %></td>
	</tr><tr>
		<td>File Path Complete</td><td><%= filePathComplete %></td>
	</tr><tr>
		<td>File Size</td><td><%= fileSize %></td>
	</tr><tr>
		<td>File Size Translated</td><td><%= fileSizeTranslated %></td>
	</tr><tr>
		<td>Content Type</td><td><%= contentType %></td>
	</tr><tr>
		<td>No. of Form Elements</td><td><%= countElements %></td>
	</tr>	
	<tr>
		<td>Name</td><td><a href="<%= linkInput %>"><%= user_name %></a></td>
	</tr>
	<tr>
		<td>Department</td><td><%= department %></td>
			<tr>
		<td>Width</td><td><%= width%></td>
	</tr>
				<tr>
		<td>Length</td><td><%= Length%></td>
	</tr>
					<tr>
		<td>quanitity</td><td><%= quanitity%></td>
	</tr>
	</tr>

	<tr>





	</table><br><br>
	
	<p style="padding-left:220;">
	<%
		If fileUploaded = True Then
			Response.Write fileName & " data uploaded..."
			Else
			Response.Write "<font color=""red"">You chose not to upload an image...</font>"
		
		End If
	%>
	</p>
	
	<br>
	<%
Dim myMail


Set myMail = CreateObject("CDO.message")
HTML = HTML & "<html>"
    HTML = HTML & "<head>"
    HTML = HTML & "<title>Large Format Print Request</title>"
    HTML = HTML & "</head>"
    HTML = HTML & "<body bgcolor=""FFFFFF"">"
    HTML = HTML & "<p><font size =""3"" face=""Arial"">"

Html = Html & "<b>Large Format Print Request</b><br><br>" 
Html = Html & "Name: " & "<u>" & request.form("user_name") & "</u>" & "    "
Html = Html & "Email: " & "<u>" & request.form("email") & "</u>" & "<br><br>"
Html = Html & "Phone: " & "<u>" & request.form("phone") & "</u>" & "<br><br>"
Html = Html & "Dimensions: " & "<u>" & request.form("width") &  request.form("length") &  "</u>" & "<br><br>"
Html = Html & "Duedate: " & "<u>" & request.form("duedate0") & "</u>" & "<br><br><br><br>"
HTML = HTML & "<A HREF=""http://www.kenn.cr.k12.ia.us/FormsRestricted/largeformat/results.asp"">Details<A/><BR><BR>"
HTML = HTML & "</body>"
    HTML = HTML & "</html>"


email = email & request.form("mail")

' The format is VariableName=request.form("FormFieldName")
MyMail.From= "KENN_WEB_SERVICES"
MyMail.To="dschmuecker@cr.k12.ia.us"
myMail.Subject="Large Format Printing Request"
myMail.htmlBody= html
myMail.Importance="2"
myMail.Send 

Set myMail = Nothing
%>
	
<%
	
		DIM Conn,strConn,SQLstmt,RS,imgpath
		imgpath="http://www.kenn.cr.k12.ia.us/gallery/currentevents/"
		set  Conn = server.createobject("adodb.connection")
		strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/fpdb/fpdbdata.mdb")
		Conn.open strConn
	
		
		
		SQLstmt = "INSERT INTO largeformat (fileName,filePath,filePathComplete,fileSize,fileSizeTranslated,contentType,countElements,user_name,email,phone,department,width,length,quanitity,duedate0,directions,imgpath)"
		SQLstmt = SQLstmt & " VALUES (" 
        SQLstmt = SQLstmt & "'" & replace(filename,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & filePath & "',"
		SQLstmt = SQLstmt & "'" & filePathComplete & "',"
		SQLstmt = SQLstmt & "'" & fileSize & "',"
		SQLstmt = SQLstmt & "'" & fileSizeTranslated & "',"
		SQLstmt = SQLstmt & "'" & contentType & "',"
		SQLstmt = SQLstmt & "'" & countElements & "',"
		SQLstmt = SQLstmt & "'" & replace(user_name,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(email,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(phone,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(department,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(width,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(length,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(quanitity,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(duedate0,"'","''") & "',"
		SQLstmt = SQLstmt & "'" & replace(directions,"'","''") & "',"
		SQLstmt = SQLstmt & "'" & imgpath & "'"
		SQLstmt = SQLstmt & ")"


		Set RS = conn.execute(SQLstmt)
			If err.number>0 then
   			response.write "VBScript Errors Occured:" & "<P>"
    		response.write "Error Number=" & err.number & "<P>"
    		response.write "Error Descr.=" & err.description & "<P>"
    		response.write "Help Context=" & err.helpcontext & "<P>" 
    		response.write "Help Path=" & err.helppath & "<P>"
    		response.write "Native Error=" & err.nativeerror & "<P>"
    		response.write "Source=" & err.source & "<P>"
    		response.write "SQLState=" & err.sqlstate & "<P>"
   		end if
   		IF conn.errors.count> 0 then
    		response.write "Database Errors Occured" & "<P>"
    		response.write SQLstmt & "<P>"
   			for counter= 0 to conn.errors.count
    			response.write "Error #" & conn.errors(counter).number & "<P>"
    			response.write "Error desc. -> " & conn.errors(counter).description & "<P>"
   			next
   		else
		Response.Write "<font color=""red"">Thanks...Database Up-dated.</font>"
		end if
		
		
		
		%>


	

		
</body>
</html>

I researched this problem before bugging you guys and found this: Due to the special ENCTYPE="multipart/form-data" attribute of your form, you cannot use the Reqest.Form collection. Use Upload.Form instead, but only after you call Upload.Save (SaveVirtual, SaveToMemory).

I just can't get the script correct. Can anyone help?
Here's the form code if this is needed.
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Winmaclab Printing Large</title>
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=120,height=120,left = 450,top = 300');");
}
// End -->
</script>

</head>

<body bgcolor="#040639">

<div align="center">
  <center>
 
<table width="760" style="border-style: solid; border-color:#FFFFFF; border-width: 1">
<tr>
<td>
<table border="0" width="760" height="175" bgcolor="#FFFDBD">
  <tr>
    <td align="left">
    
      <img border="0" src="imgs/logo5.jpg" border="0">
    </td>
  </tr>
  </table>
 
 <table width="766" height="175" bgcolor="#FFFDBD" cellpadding="5">
  <tr>
    <td height="21" colspan="3">
    <font face="Arial">
    <table width="750" height="1">
    <tr>
    <td valign="top" height="70" colspan="5" width="742"><font size="2"><font color="#0C0D41"><b>HP Designjet
      1053C Plus</b></font> can print pictures as large as 3ft wide by almost unlimited
      length. <br>
      Prints can be at photo quality. <a href="http://h10010.www1.hp.com/wwpc/us/en/sm/WF06b/18972-18972-3328061-12600-3328078-24023-12607-33259.html?jumpid=reg_R1002_USEN" target="_blank">Click
      here for the specs</a>.<br>
      The cost of replacing the ink and heads is just under $800. We are
      charging just enough money to pay for their replacements.<br>
      Printing business, such as Copyworks, charge between $9-$14 per square
      foot. </font></font>
      </td>
  </tr>
  <tr>
    <td width="390" height="1" valign="top" background="imgs/heading.gif">
      <font color="#FFFFFF" face="Arial" size="3"><b>Prices & Coverage</b></font></td>
    <td height="1" valign="top" width="8">
    </td>
    <td height="1" valign="top" width="4">
    </td>
    <td height="1" valign="top" width="4">
    </td>
    <td valign="top" bgcolor="#F0D684" width="300" height="336" rowspan="6">
    <table>
    <tr>
    <td width="260" align="center">
      <img border="0" src="imgs/printer.gif">
      </td>
      </tr>
      </table>
   
    <div align="center">
      <table border="0" width="90%" bgcolor="#FFFFFF" height="60" style="border-style: solid; border-color:#FFFFFF; border-width: 1">
        <tr>
          <td  height="56" valign="top"><font size="2">Save money
            and give students a chance to learn the basics of the design and
            print industry.</font>
            <p><font size="2">When you fill out the order form you will notice
            the file upload input. It is important to give us the information and
            the basic design of your poster. A student will finalize the design in one of our Adobe
            products and print the poster.</font></p>
            <p><font size="2">We want to thank the Cedar Rapids Gazette for
            donating this large format printer. They used it to proof the
            Gazette.</font></p>
          </td>
        </tr>
      </table>
    </div>
 
    </td>
  </tr>
  <tr>
 <td valign="top" colspan="4" bgcolor="#FFFFFF" width="436" height="38">
    <u><b>
    <font face="Arial" size="2">$4 per square foot </font>
 </b>
    <font face="Arial" size="2">for 100%
    coverage....</font></u>   <a href="javascript:popUp('imgs/form.a4.jpg')"><img border="1" src="imgs/form.a4.jpg" width="57" height="41"> 
    </a> 
    <p><u><b>
    <font face="Arial" size="2">$3 per square foot </font>
 </b>
    <font face="Arial" size="2">for 50%
    coverage....</font> </u>   <a href="javascript:popUp('imgs/form.a5.jpg')"><img border="1" src="imgs/form.a5.jpg" width="32" height="43"></a></p>
    <font face="Arial" size="2"><u><b>$2 per square foot </b>for text
    coverage.....</u></font>   <a href="javascript:popUp('imgs/form.a6.jpg')"><img border="1" src="imgs/form.a6.jpg" width="56" height="35">
    </a>
    </td>

  </tr>
  <tr>
    <td width="390" height="21" valign="top" background="imgs/heading.gif">
      <font color="#FFFFFF" face="Arial" size="3"><b>Payment Options</b></font></td>
    <td height="21" valign="top" width="8">
    </td>
    <td height="21" valign="top" width="4">
    </td>
    <td height="21" valign="top" width="4">
    </td>
  </tr>
  <tr>
    <td valign="middle" colspan="4" bgcolor="#FFFFFF" width="436" height="35">
    <font size="2" face="Arial"><b>For Kennedy staff/departments:</b> the money
    can be transferred from your account into the Large Format Printer account.
    Karen James, the book-keeper will transfer the money. <br>
    <b>Non-Kennedy: </b>contact Karen James and make payment arrangements.<br>
    Her email is <a href="mailto:kjames@cr.k12.ia.us">kjames@cr.k12.ia.us</a>. </font>
    </td>
  </tr>
  <tr>
    <td  height="11" background="imgs/heading.gif" width="402">
      <b><font face="Arial" color="#FFFFFF" size="3">Ordering Process (please
      read the directions)</font></b></td>
    <td height="11" width="8">
    </td>
  </tr>
  <tr>
    <td width="416" height="255" colspan="2">
    <b><font face="Arial" size="2" color="#000080">This is a two part process. You have
    to click the notification button and then fill out the form and click the submit button.
    </font></b><br>
  	<form method="POST" enctype="multipart/form-data" action="Insertalt.asp">
      <input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
        <p><font face="Arial"><font size="2"><b>Name:</b></font> <input type="text" name="user_name" size="36"></font></p>
        <p><font size="2" face="Arial"><b>Email: </b></font><font face="Arial"><input type="text" name="email" size="36"></font></p>
        <p><font face="Arial"><b>Phone: </b><input type="text" name="phone" size="18"></font></p>
        <p><font face="Arial"><b><font size="2">Department:</font></b> <input type="text" name="department" size="31">
        <font size="2">(If applicable)</font></font></p>
      <p><font face="Arial"><font size="2"><b>Size:</b></font> <font size="2"><b>width </b></font><select size="1" name="width">
        <option>12</option>
        <option>16</option>
        <option>20</option>
        <option>24</option>
        <option>28</option>
        <option>32</option>
        <option>36</option>
      </select> '' x <b><font size="2">length</font></b><font size="2"><b> </b></font><select size="1" name="length">
        <option>12</option>
        <option>16</option>
        <option>20</option>
        <option>24</option>
        <option>28</option>
        <option>32</option>
        <option>36</option>
        <option>40</option>
        <option>44</option>
        <option>48</option>
        <option>52</option>
        <option>56</option>
        <option>60</option>
        <option>64</option>
        <option>68</option>
        <option>72</option>
        <option>76</option>
        <option>80</option>
        <option>84</option>
        <option>88</option>
        <option>92</option>
        <option>96</option>
        <option>100</option>
      </select><font size="2">  </font>''</font></p>
        <p><font face="Arial"><font size="2"><b>Quantity:</b></font> </font><select size="1" name="quanitity">
          <option>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
        </select>
      </p>
        <p><font size="2" face="Arial"><b>Deadline: </b></font><font face="Arial"><input type="text" name="duedate0" size="31">
        </font>
      </p>
        <p><font size="2"><b>Comments: <textarea rows="2" name="directions" cols="36"></textarea></b></font> 
      </p>
      <font face="Arial" size="2"><font color="#191C54">
      Upload a word or image file with the content of the print </font><b><br>
      File Upload:</b></font> <input type="file" name="file" size="40">
      
        <p><font face="Arial"><input type="submit" value="Submit" name="B1"></font></p>
      </form>
    </td>
  </tr>
  
</table>
</td>
</tr>
</table>
</table>
<table  style="border-style: solid; border-color:#FFFFFF; border-width: 1">
<tr>
    <td width="760" height="21" colspan="6" bgcolor="#ffffff"  style="border-style: solid; border-color:" border-width: 1" #040639"; align="center">
      email:
      <a href="mailto:dennisschmuecker@cr.k12.ia.us">dschmuecker@cr.k12.ia.us</a>
       | <a href="login.asp" style="font-family: Arial; font-size: 10pt; color: #000000; font-weight: bold">Admin</a> | 
      <!-- #include virtual="/hitcounter/hitinclude.asp" --></td>
  </tr>
  </table>

  </center>
</div>

</body>

</html>




Spooky -> RE: email problem with asp upload (1/21/2008 14:23:15)

ANy instance of request.form needs to be changed

eg:

Html = Html & "Name: " & "<u>" & request.form("user_name") & "</u>" & "    "


Should be:

Html = Html & "Name: " & "<u>" & Upload.Form("user_name") & "</u>" & "    "




dschmuecker -> RE: email problem with asp upload (1/21/2008 22:27:40)

I"m getting this error message.
Microsoft VBScript runtime error '800a01a8'

Object required: ''

/FormsUnrestricted/largeformat/Insertalt.asp, line 156


Html = Html & "Name: " & "<u>" & upload.form("user_name") & "</u>" & "    "




Spooky -> RE: email problem with asp upload (1/21/2008 23:15:18)

Are you sure what you said is correct?
It seems to need "load.getValue" and not "upload.form" ?




dschmuecker -> RE: email problem with asp upload (1/22/2008 8:02:17)


I changed the all the variables to load.getValue("email") format in the email script and I still got this error message. So I don't know what's going on.
Microsoft VBScript runtime error '800a01a8'

Object required

/FormsUnrestricted/largeformat/Insertalt.asp, line 156


<!--#include file="Loader.asp"-->
<%
	Response.Buffer = True
	' load object
	Dim load
		Set load = new Loader
				' calling initialize method
		load.initialize
			' File binary data
	Dim fileData
		fileData = load.getFileData("file")
	' File name
	Dim fileName
		fileName = LCase(load.getFileName("file"))
	' File path
	Dim filePath
		filePath = load.getFilePath("file")
	' File path complete
	Dim filePathComplete
		filePathComplete = load.getFilePathComplete("file")
	' File size
	Dim fileSize
		fileSize = load.getFileSize("file")
	' File size translated
	Dim fileSizeTranslated
		fileSizeTranslated = load.getFileSizeTranslated("file")
	' Content Type
	Dim contentType
		contentType = load.getContentType("file")
	' No. of Form elements
	Dim countElements
		countElements = load.Count
	
	Dim user_name
		user_name= load.getValue("user_name")
		
			Dim email
		email= load.getValue("email")
		
			Dim phone
		phone= load.getValue("phone")
				
	
	
	Dim department
		department= load.getValue("department")
		
	Dim width
		width= load.getValue("width")
		

	
	Dim length
	
		length= load.getValue("length")
		
			Dim quanitity
	quanitity= load.getValue("quanitity")
			Dim duedate0
	duedate0= load.getValue("duedate0")
	
	
				Dim directions
	directions= load.getValue("directions")
           
	Dim pathToFile
		pathToFile = Server.mapPath("/gallery/currentevents/") & "\" & fileName
			
		' Uploading file data
	Dim fileUploaded
		fileUploaded = load.saveToFile ("file", pathToFile)
				' destroying load object
	Set load = Nothing	
%>

<html>
<head>
	<title>File Uploading with ASP</title>
    <style>
		body, input, td { font-family:verdana,arial; font-size:10pt; }
	</style>
</head>
<body>
    <p align="center">
		<b>File Uploading with ASP</b>
	</p>
	
	<table width="700" border="1" align="center">
	<tr>
		<td>File Name</td><td><%= fileName %></td>
	</tr><tr>
		<td>Imgpath</td><td><%= imgpath %></td>
	</tr>
	<tr>
		<td>File Path</td><td><%= filePath %></td>
	</tr><tr>
		<td>File Path Complete</td><td><%= filePathComplete %></td>
	</tr><tr>
		<td>File Size</td><td><%= fileSize %></td>
	</tr><tr>
		<td>File Size Translated</td><td><%= fileSizeTranslated %></td>
	</tr><tr>
		<td>Content Type</td><td><%= contentType %></td>
	</tr><tr>
		<td>No. of Form Elements</td><td><%= countElements %></td>
	</tr>	
	<tr>
		<td>Name</td><td><a href="<%= linkInput %>"><%= user_name %></a></td>
	</tr>
	<tr>
		<td>Department</td><td><%= department %></td>
			<tr>
		<td>Width</td><td><%= width%></td>
	</tr>
				<tr>
		<td>Length</td><td><%= Length%></td>
	</tr>
					<tr>
		<td>quanitity</td><td><%= quanitity%></td>
	</tr>
	</tr>

	<tr>





	</table><br><br>
	
	<p style="padding-left:220;">
	<%
		If fileUploaded = True Then
			Response.Write fileName & " data uploaded..."
			Else
			Response.Write "<font color=""red"">You chose not to upload an image...</font>"
		
		End If
	%>
	</p>
	
	<br>
	<%
Dim myMail


Set myMail = CreateObject("CDO.message")
HTML = HTML & "<html>"
    HTML = HTML & "<head>"
    HTML = HTML & "<title>Large Format Print Request</title>"
    HTML = HTML & "</head>"
    HTML = HTML & "<body bgcolor=""FFFFFF"">"
    HTML = HTML & "<p><font size =""3"" face=""Arial"">"

Html = Html & "<b>Large Format Print Request</b><br><br>" 
Html = Html & "Name: " & "<u>" & load.getValue("user_name") & "</u>" & "    "
Html = Html & "Email: " & "<u>" & load.getValue("email") & "</u>" & "<br><br>"
Html = Html & "Phone: " & "<u>" & load.getValue("phone") & "</u>" & "<br><br>"
Html = Html & "Dimensions: " & "<u>" & load.getValue("width") &  upload.form("length") &  "</u>" & "<br><br>"
Html = Html & "Duedate: " & "<u>" & load.getValue("duedate0") & "</u>" & "<br><br><br><br>"
HTML = HTML & "<A HREF=""http://www.kenn.cr.k12.ia.us/FormsRestricted/largeformat/results.asp"">Details<A/><BR><BR>"
HTML = HTML & "</body>"
    HTML = HTML & "</html>"


email = email & load.getValue("mail")

' The format is VariableName=request.form("FormFieldName")
MyMail.From= "KENN_WEB_SERVICES"
MyMail.To="dschmuecker@cr.k12.ia.us"
myMail.Subject="Large Format Printing Request"
myMail.htmlBody= html
myMail.Importance="2"
myMail.Send 

Set myMail = Nothing
%>
	
	
<%
	
		DIM Conn,strConn,SQLstmt,RS,imgpath
		imgpath="http://www.kenn.cr.k12.ia.us/gallery/currentevents/"
		set  Conn = server.createobject("adodb.connection")
		strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/fpdb/fpdbdata.mdb")
		Conn.open strConn
	
		
		
		SQLstmt = "INSERT INTO largeformat (fileName,filePath,filePathComplete,fileSize,fileSizeTranslated,contentType,countElements,user_name,email,phone,department,width,length,quanitity,duedate0,directions,imgpath)"
		SQLstmt = SQLstmt & " VALUES (" 
        SQLstmt = SQLstmt & "'" & replace(filename,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & filePath & "',"
		SQLstmt = SQLstmt & "'" & filePathComplete & "',"
		SQLstmt = SQLstmt & "'" & fileSize & "',"
		SQLstmt = SQLstmt & "'" & fileSizeTranslated & "',"
		SQLstmt = SQLstmt & "'" & contentType & "',"
		SQLstmt = SQLstmt & "'" & countElements & "',"
		SQLstmt = SQLstmt & "'" & replace(user_name,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(email,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(phone,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(department,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(width,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(length,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(quanitity,"'","''") & "'," 
		SQLstmt = SQLstmt & "'" & replace(duedate0,"'","''") & "',"
		SQLstmt = SQLstmt & "'" & replace(directions,"'","''") & "',"
		SQLstmt = SQLstmt & "'" & imgpath & "'"
		SQLstmt = SQLstmt & ")"


		Set RS = conn.execute(SQLstmt)
			If err.number>0 then
   			response.write "VBScript Errors Occured:" & "<P>"
    		response.write "Error Number=" & err.number & "<P>"
    		response.write "Error Descr.=" & err.description & "<P>"
    		response.write "Help Context=" & err.helpcontext & "<P>" 
    		response.write "Help Path=" & err.helppath & "<P>"
    		response.write "Native Error=" & err.nativeerror & "<P>"
    		response.write "Source=" & err.source & "<P>"
    		response.write "SQLState=" & err.sqlstate & "<P>"
   		end if
   		IF conn.errors.count> 0 then
    		response.write "Database Errors Occured" & "<P>"
    		response.write SQLstmt & "<P>"
   			for counter= 0 to conn.errors.count
    			response.write "Error #" & conn.errors(counter).number & "<P>"
    			response.write "Error desc. -> " & conn.errors(counter).description & "<P>"
   			next
   		else
		Response.Write "<font color=""red"">Thanks...Database Up-dated.</font>"
		end if
		
		
		
		%>


	

		
</body>
</html>


















Spooky -> RE: email problem with asp upload (1/22/2008 14:26:01)

At line 73, you destroy the load object.
This would need to be open for the whole page or the code completed before it closes




dschmuecker -> RE: email problem with asp upload (1/22/2008 16:13:44)

Your the best. Thanks. I moved the Set load = Nothing down to the bottom of the page and that did it.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375