How do I upload files to a database?

G

glen

I am using FP2003 and am tring to use the Form Upload File box to upload
files to a database. I was referred by MS Article ID: 288328 to a MS White
Paper Written by Jerry Bryant Published on 7-21-2001 entittled "How to Send
Form Results to a Database and an E-mail Address and Use the File Upload
Component simultaneously"
All was going well until creating the Process2.asp page on step 5 where I
insert the Custom Query INSERT INTO Results (Name, Email, Comments, File)
VALUES (‘::Name::’, ‘::Email::’, ‘::Comments::’, ‘::File::’) I get a
message saying "The Custom Query Contains Errors" I have no clue as to how
to resolve this error!
 
S

Stefan B Rusynko

Not sure if it is your newsreader encoding or pasting (for the delimiters)
but that query needs to be all on 1 line as
INSERT INTO Results (Name, Email, Comments, File) VALUES (‘::Name::’, ‘::Email::’, ‘::Comments::’, ‘::File::’)
and not
INSERT INTO Results (Name, Email, Comments, File) VALUES (‘::Name::’, ‘::Email::’, ‘::Comments::’, ‘::File::’)

FYI
Uploading a binary (your file) to a DB is not a recommended practice

You would be better of checking if your host support ASPupload and
- just saving the uploaded file name (and or path) to your DB
- and w/ ASPupload uploading the file to a folder on your site
See http://www.aspupload.com/
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I am using FP2003 and am tring to use the Form Upload File box to upload
| files to a database. I was referred by MS Article ID: 288328 to a MS White
| Paper Written by Jerry Bryant Published on 7-21-2001 entittled "How to Send
| Form Results to a Database and an E-mail Address and Use the File Upload
| Component simultaneously"
| All was going well until creating the Process2.asp page on step 5 where I
| insert the Custom Query INSERT INTO Results (Name, Email, Comments, File)
| VALUES (‘::Name::’, ‘::Email::’, ‘::Comments::’, ‘::File::’) I get a
| message saying "The Custom Query Contains Errors" I have no clue as to how
| to resolve this error!
|
|
 
G

glen

Thanks for the reply.

The code is on one line it just dosen't appear correctly here. I noticed
someone else had trouble with this white paper - perhaps it has to do with
version 2003 of FP as the article was written pre 2003?

Why is uploading a file to a database not recommended? Does it cause
security problems? hangs up? ?
 

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