|
|
 |
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: |
 |
|