View Full Version : Inserting images into sql

01-23-2003, 04:39 PM
hi there

I wish to upload an image into my sql database for displaying in a dynamic asp page.

i have the feild in the databse set to image but how do i submit the image.

I have tried to use a browse for file button and this doesn't seem to work.

I have the form submiting into the database and then going to a page that displays the new entry. i have a image with its sourse coming dynamically out of the database but it does not seem to appear.

here is the code for the input item that the form uses to submit into the image feild:

<input name="popimage" type="file" id="popimage2" value="<%= Request.Form("popimage") %>">

here is the code for the display page:

<table width="<%=(popupjs.Fields.Item("actwidth").Value)%>" border="1" cellpadding="1" cellspacing="4" bordercolor="#FFFFFF">
<td align="center"> <div align="center"><a href="http://www.bemrosebooth.com/press_centre/press_release.asp?prID=<%=(popupjs.Fields.Item("popurl").Value)%>" target="_blank"><img src="<%=(popupjs.Fields.Item("popimage").Value)%>" border="0"></a></div></td>
<td><font color="#000000"><font class="popup_head"><%=(popupjs.Fields.Item("poptitle").Value)%></font></font></td>
<td ><span class="layerlinktext"></span><span class="layerlinktext"><%=(popupjs.Fields.Item("poptext").Value)%></span></td>
<td ALIGN="center" VALIGN="top"> <div align="right" class="blue"><u>Full story</u></div></td>

Can someone tell me where i am going wrong as this is the first time i have tried to do this.

but it does not seem to work. any ideas welcome

:confused: :confused: :confused:

01-24-2003, 02:25 AM
Some possible results here?