Forums
This topic is locked
asp upload 2.09 I have a form with five file
Posted 17 Jan 2003 16:48:38
1
has voted
17 Jan 2003 16:48:38 david j johnson posted:
I am inserting a reccord to a database with five file fields. the user many not have five images. I tried to enter a default value in the database "blank.jpg" That is just a white square. but the upload form inserst a blank for the field that have no image file name. How do you establish a defult value if their is no file for the upload.Edited by - johnsondaja on 18 Jan 2003 05:07:07
Edited by - johnsondaja on 18 Jan 2003 05:09:57
Replies
Replied 18 Jan 2003 05:08:49
18 Jan 2003 05:08:49 david j johnson replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I am inserting a reccord to a database with five file fields. the user many not have five images. I tried to enter a default value in the database "blank.jpg" That is just a white square. but the upload form overwrites with a null value for the field. How do you establish a default value. if their is no file for the upload.
Edited by - johnsondaja on 18 Jan 2003 05:07:07
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I am inserting a reccord to a database with five file fields. the user many not have five images. I tried to enter a default value in the database "blank.jpg" That is just a white square. but the upload form overwrites with a null value for the field. How do you establish a default value. if their is no file for the upload.
Edited by - johnsondaja on 18 Jan 2003 05:07:07
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 18 Jan 2003 08:01:10
18 Jan 2003 08:01:10 asp asp replied:
put this
<IMG SRC="<% if Trim(rsTest.Fields.Item("Image".Value) = "" then Response.Write "default_image.gif" else Response.Write rsTest.Fields.Item("Image".Value %>" >
<IMG SRC="<% if Trim(rsTest.Fields.Item("Image".Value) = "" then Response.Write "default_image.gif" else Response.Write rsTest.Fields.Item("Image".Value %>" >