I am working on a project which requires that users can visit a web-site & upload/download txt files/images/mp3s along with providing info. in the form describing what they are uploading. This info is then saved to an Oracle DB & the files are uploaded to my web server at college.
This is my progress so far:
I can take in info in a form & save it to the DB no probs.
I can take in an upload and have it stored on my web space no probs. (USING the ABCUpload component)
http://www.websupergoo.com/abcupload-1.htm
The problem is when I try to combine the two in one ASP page I get an error.
Code:
ABCUpload4.XForm.4 error '80004005'
Upload stopped unexpectedly.
/bsci99/pwalsh/databases/upload1.asp, line 32
Here is my code:
UPLOAD1.ASP
Code:
<%
Dim dbCon, sql, first, second, band_name, gig_venue, rating
Dim gig_date, web_link, set_list, picture, sound, gig_id
band_name = Request.Form("band_name")
gig_venue = Request.Form("gig_venue")
gig_date= Request.Form("gig_date")
web_link = Request.Form("web_link")
set_list = Request.Form("set_list")
picture = Request.Form("picture")
sound = Request.Form("sound")
gig_id = Request.Form("gig_id")
rating = Request.Form("rating")
Set dbCon = Server.CreateObject("ADODB.Connection")
dbCon.Open("DSN=BISDATA; UID=99089980; PWD=hIlton12")
sql = "INSERT INTO GIG (gig_id, band_name, gig_venue, rating, web_link, gig_date) VALUES ('"&gig_id&"','"&band_name&"','"&gig_venue&"','"&rating&"','"&web_link&"','"&gig_date&"');"
dbCon.BeginTrans
dbCon.Execute(sql)
dbCon.CommitTrans
dbCon.Close
Set dbCon = nothing
%>
Insertion complete
<%
Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm("rev")(1).Save "myupload.txt"
%>
My HTML PAGE
Code:
<html>
<head><title>Database insert</title></head>
<body>
<center>
<h1><b>Gig Record Insertion</b></h1>
<form method="post" action="upload1.asp" enctype="multipart/form-data">
<table border="1" width="34%">
<tr>
<td width="45%">Band Name:</td>
<td width="65%">
<p><input type="text" name="band_name" size="20"></p>
</td>
</tr>
<tr>
<td width="45%">Gig Venue:</td>
<td width="65%"><input type="text" name="gig_venue" size="20"></td>
</tr>
<tr>
<td width="45%">Gig Date:</td>
<td width="65%">
<p><input type="text" name="gig_date" size="20"></p>
</td>
</tr>
<tr>
<td width="45%">Web Link:</td>
<td width="65%">
<p><input type="text" name="web_link" size="25"></p>
</td>
</tr>
<tr>
<td width="45%">Review:</td>
<td width="65%">
<p><input type="file" name="rev"></p>
</td>
</tr>
<tr>
<td width="45%">Set-List:</td>
<td width="65%">
<p><input type="text" name="set_list" size="20"></p>
</td>
</tr>
<tr>
<td width="45%">Picture:</td>
<td width="65%">
<p><input type="text" name="picture" size="20"></p>
</td>
</tr>
<tr>
<td width="45%">Sound:</td>
<td width="65%">
<p><input type="text" name="sound" size="20"></p>
</td>
</tr>
<tr>
<td width="45%">Rating:</td>
<td width="65%">
<p><input type="text" name="rating" size="2"></p>
</td>
</tr>
<tr>
<td width="45%">Gig ID:</td>
<td width="65%">
<p><input type="type" name="gig_id" size="3"></p>
</td>
</tr>
</table>
<p><input type="submit" value="Submit" name="Submit"></p>
</center></form>
</body></html>
why is it that I can't combine these two techniques in one ASP page?
Any help would be greatly appreciated.