Forums

This topic is locked

insert default value

Posted 03 Oct 2001 07:22:37
1
has voted
03 Oct 2001 07:22:37 snakk jenson posted:
hi there,
I'm trying out uploading files with PureASPUpload and use the insert record SB to
insert file names into database. On the upload page there are 3 file fields and they will be optional.

the problem is when any of the file fields is left blank when submited, it will insert a zero-lengh value into the database imagePath field. As I know, the insert record behavier is excuted after the files have been uploaded, so is there any way to modify the UD insert record codes to provide a default value (let's say "none.gif" instead of a empty value?

I've try typing none.gif in the file field manually but that will get error message from ASPUpload. I need a file name in every database fields and actually I've tried the default value in the database too, but it won't work since the zero-lengh value overwrite it.

Is there anyone could help? I guess this is a simple task and can be solved with something like a If...then... statement, but I am such a newbie who can't get it work.
All comments are appreciated!

snAkk

Reply to this topic