Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

help with aspupload object

date posted 27th June 2002 14:33

--------------060504060803060507000905
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi guys,

I'm trying to use the asp upload object suggested on the forum recently
to upload some images at the same time as I update a db.

The problem I'm having is that it creates a server object that I can't
shut down, so consequently when I try to create another object to update
the db the server won't let me.

At least that's what I think the problem is !

Could someone have a quick gander at the code for me?

Thanks,

John

0 Then


SaveFileName = "Uploads/" & upl.ExtractFileName(upl.Form("File1"))


If upl.SaveToWeb("File1", SaveFileName) Then
FileSaved = TRUE

End If

End If
%>










ASP Simple Upload Example #2

ASP Simple Upload Example
Very Simple Example

Select an image file on your hard drive:

>" name="Continue">




--

Fatfriar Productions

"Perfection through Communication"

Website Design and Production at a reasonable rate and with a level of
service second to none.

Web: http://www.Fatfriar.com E-mail: [EMAIL REMOVED]

Telephone: +44 (0)208 405 4151

Mobile telephone: +44 (0)7798 746 685

The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorised. If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or
any action or omission taken by you in reliance on it, is prohibited and
may be unlawful. Please contact the sender immediately if you have
received this message in error. Thank you.


--------------060504060803060507000905
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit





Hi guys,

I'm trying to use the asp upload object suggested on the forum recently to
upload some images at the same time as I update a db.

The problem I'm having is that it creates a server object that I can't shut
down, so consequently when I try to create another object to update the db
the server won't let me.

At least that's what I think the problem is !

Could someone have a quick gander at the code for me?

Thanks,

John

<% Option Explicit

Dim upl, SaveFileName, FileSaved, fso, f, objConnection


Set upl = Server.CreateObject("ASPSimpleUpload.Upload")


If Len(upl.Form("File1")) > 0 Then

   
    SaveFileName = "Uploads/" & upl.ExtractFileName(upl.Form("File1"))
   
   
    If upl.SaveToWeb("File1", SaveFileName) Then
        FileSaved = TRUE
   
    End If

    End If
%>



<html>
<Head>
<title></title>       
</head>
<body>
<%
IF FileSaved=TRUE THEN
objConnection = Server.CreateObject("ADODB.Connection")
        objConnection.open("adb")
        SQL="SELECT * FROM stock order by ID"
        rsRESULT=objConnection.Execute(SQL)
       
        flag=rsRESULT("make")
END IF
%>

<html><head><title>ASP Simple Upload Example #2</title></head>
<body>
<font size="4"><b>ASP Simple Upload Example</b></font><br>
Very Simple Example<p>
<form method="POST" enctype="multipart/form-data" action="upload.Asp">
  Select an image file on your hard drive:<br>
  <input type="file" name="File1" size="30"><p>
  <input type="submit" value="Click to Continue >>" name="Continue">
</form>
<%if FileSaved = TRUE THEN
  alert(flag)
end if
%>

</body>
--
Fatfriar Productions

Fatfriar Productions
"Perfection through Communication"
Website Design and Production at a reasonable rate and
with a level of service second to none.
Web: http://www.Fatfriar.com E-mail:



Messages by Day
June 30th 2002
June 29th 2002
June 28th 2002
June 27th 2002
June 26th 2002
June 25th 2002
June 24th 2002
June 23rd 2002
June 22nd 2002
June 21st 2002
June 20th 2002
June 19th 2002
June 18th 2002
June 17th 2002
June 16th 2002
June 15th 2002
June 14th 2002
June 13th 2002
June 12th 2002
June 11th 2002
June 10th 2002
June 9th 2002
June 8th 2002
June 7th 2002
June 6th 2002
June 5th 2002
June 4th 2002
June 3rd 2002
June 2nd 2002
June 1st 2002


Messages by Month
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002


Messages by Year
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000