A web DB APP allowing the uploading of a pict
I am working on a web application (Oldsmobile classified ads), which will allow a user to submit some info to a SQL 7 database. I am trying to add the functionality of allowing the user to upload a picture. I am trying to do this via Visual Interdev 6.0 SP3 running on Windows 2000 SP1. I was easily able to drag the "File Field" component from the HTML Toolbox onto my ASP form. My database has an AdPhoto column of type image. Now I just have to get the insert asp file to put the image into the database in the AdPhoto column.
My problem is I do not know how to format the insertSQL command. The picture is being sent to the DB in the middle of other data, hence the need for the "," at the end of the SQL command.
I have tried:
strInsertSql = strInsertSql + "'" + Request.Form.Item("txtAdPhoto") + "',"
and:
strInsertSql = strInsertSql + Request.Form.Item("txtAdPhoto") + ","
All attempts lead to "the page cannot be displayed" errors in IE with the AdPhoto stuff in the placead.asp and insertad.asp. Removing the photo stuff will allow things to work again but no photos get upload of course.
The page that I am working with is:
http://h004f49086f4a.ne.mediaone.net/oldsads/placead.asp
You can see the source code by viewing source at:
http://h004f49086f4a.ne.mediaone.net/oldsads/placead.txt
The page that is receiving the data from the form is here:
http://h004f49086f4a.ne.mediaone.net/oldsads/insertad.asp
You can see the source code by viewing source at:
http://h004f49086f4a.ne.mediaone.net/oldsads/insertad.txt
Any suggestions? Got a better way? Maybe there is a .dll out there I could use that was written in VB or something? Maybe there is a way I could FTP the user's file to a FTP directory? Show me the light! Thanks in advance!
Rob
rob@thecutlass.com

