473,379 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Problem calling ASPUpload with a Sub

Hi All,

I've just started using ASPupload and can successfully submit files to a directory on the web server and form data to a database - i can then retrieve the form data and links to the files through an "edit" page to allow a user to adjust their content and resubmit the form and files, either as a draft (which just saves things) or as a real submission (which saves and emails their manager with links back to the content).

The problem I'm having is I can't figure out how to call asp upload with a sub process (currently there are two on this form - one for save as draft the other as submit for review)

And now to the code..

The initial form is loaded using a sub process with a query string to bring up the correct info from the database

<form ENCTYPE="multipart/form-data" METHOD="POST" name="form" action="<%=Request.ServerVariables("SCRIPT_NAME")% >">

The Sub process is called using a javascript button to call it - I've changed all teh request.form info to upload.form but no joy as I'm missing something - if anyone has run across this before and can help please let me know! My hunch is in using the request call for the id and script...but I could be off here..

<%Sub SubmitRFC()

Set Upload = Server.CreateObject("Persits.Upload")

' Uncomment this line if unique file name generation is necessary
' Upload.OverwriteFiles = False
' We must call Upload.Save or SaveVirtual before we can use Upload.Form!
Upload.Save "e:\uploads"

Set sFile1 = Upload.Files("sFile1")
Set sFile2 = Upload.Files("sFile2")

'On error resume next
'This will be used to submit the facilities managers updates
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open Application("Conn_String")
Call DBErrorHandler()
sSQL = "UPDATE tblRFC SET "
sSQL = sSQL & "date ='" & SQLdate(Upload.Form("date"),"/") & "', "
sSQL = sSQL & "sRFC_Name ='" & replace(Upload.Form ("sRFC_Name") ,"'","''") & "',"
sSQL = sSQL & "nRFC_sector ='" & replace(Upload.Form("nRFC_sector") ,"'","''") & "',"
sSQL = sSQL & "nRFC_type ='" & replace(Upload.Form("nRFC_type") ,"'","''") & "',"
sSQL = sSQL & " WHERE id = '" & request("id") & "';"

oConn.execute(sSQL)
Call DBErrorHandler()
Set oConn = Nothing

Cheers

Rich
New Zealand
Feb 7 '07 #1
0 1113

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: John Rebbeck | last post by:
(sorry about cross posting but I really need help with this and it fits in both newsgroups) I'm creating a little image manager and I'm using Persits ASPUpload. I have an UploadButton and...
2
by: | last post by:
I am using aspupload in a hosting environment. When testing the basic install of the component I am trying to use the default forms provided. When using the the first method as found at...
2
by: Vilmar Brazão de Oliveira | last post by:
Hi, How verify type or extension of file using ASPUPLOAD? I check documentation, but I didn't find anything else yet. thanks, -- ««««««««»»»»»»»»»»»»»» Vlmar Brazão de Oliveira...
5
by: the other john | last post by:
I'm not certain that what I'm asking is an AspUpload question or just a VBScript question. I am uploading a story with up to 3 pictures. Each picture uploads using aspupload with no problems. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.