Can you Upload a file and update a db on 1 form?

L

Lazlo

We have a database that keeps track of our newsletters. It's only fields are
the date the form was published, display name and newsletter path. The
database serves as pointer and a way to sort the newsletters and to search
for them. I would like to know how to use 1 form to both update the database
fields and to also upload the newsletter from the author. We also have ftp
capability on our site. I want the db update and the file upload to be as
simple as possible for our newsletter writer. Thank you in advance.
 
T

Thomas A. Rowe

Check with your web host to see if they offer a ASP upload component.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
L

Lazlo

We are our own host so that's not the problem. I have been trying to do the
file upload and database on the same form. Either the file upload works or
the db update works not both. We are trying to make it easier for the end
user to upload a newsletter and update the database with the same form. We
also have ftp capability for the site. Can you use ftp on the same form as
the update for the db? If so could you point me in the best direction. Our
site is a homebrew site. We plan to use the fileload and database update
strategy for our beer recipes also. Any help is greatly appreciated.
 
T

Thomas A. Rowe

You can not use the FP File Upload component and submit to the database:
http://support.microsoft.com/default.aspx?scid=kb;en-us;830324&Product=fp2002

You will need to create a form, then submit it to the database, then in the next step in the process
allow the user to upload a file and then update the record that was created in the first step, then
will require custom coding and a ASP upload component, such as ASPUpload from
http://www.aspupload.com

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
P

p c

FTP is simply FTP--it does not updated the database.

Yes you can do in a single form and ASP page. But, you will need to use
custom ASP code and a file upload component--or pure ASP file upload.

The ASP processing page will do the file upload but you need to add
another step for inserting a record into the database about the file's
or newsletter's details.

...PC
 
L

Lazlo

I know FTP doesn't update the database. Our newsletters are in html form. I
have the database piece working on the form. I know IBM implies you can't use
both the file upload and the database update on the same form. I probably
could write the database piece in java script or something else and use the
form uploading piece for the file upload. Which would be easy to duplicate
the database update or the file upload piece which includes a file browser?
Thanks for a second opinion by the way.
 
P

p c

You can use BOTH file upload and database update wiht the same form. It
all dependes on the "tool" or compnent you use.

Here's the concept. You have two pages, say, UploadForm.html and
UploadProcess.asp

Here's the HTML or pseodeo code:

--UploadFform.html
<form name="frmSend" method="POST" enctype="multipart/form-data" action
" UploadProcess.asp" >

<input name="attach1" type=file size=20><br>
<input name="description" type="text size=20><br>
.....

<input type="submit" value="Submit">
</form>

Optional: include form validation on this page with javascript or add it
to the processing page with ASP

--UploadProcess.asp
Optional: include form validation with ASP or add it to the form page
with javascipt
code for uploading the file
catch errors
code for updating the database
cath errors

If nor eerors corfm uplaid and FB udpate
If errors describe the rpoblem.

Here's an example of a free file upload that does not require use of a
server component.
http://www.freeaspupload.net/

The concept is the same even if use use a file upload compoent.

Good luck.
...PC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top