-
1
- #1
Right, this should be quick and easy in theory: I'm using a pure upload to upload documents and update a database at the same time. If the user chooses not to upload a file (ie leaves the file field blank), I want to either keep the database the same, or insert some other text if the field for that record is currently blank. It appears that you can't just request the file field ("PictureLocationField", see code below) using "Uploader.Form" when you're uploading from it, as it always returns as blank. Is there a way that I can vary my output depending on whether the user inserts text in this field or not?
If type_of_submit = "Amend" Then
objRS("ID Number"
= IDNumber
objRS("Part Name"
= PartName
objRS("Custodian"
= Custodian
objRS("Date Last Modified"
= UpdateModified
objRS("Date Added"
= UpdateAdded
objRS("Country"
= Country
objRS("Part Application"
= PartApplication
If PictureLocationField = "" then
If PictureServerPath = "" then
objRS("Picture Server Path"
= "Images/noimage.jpg"
objRS("Picture File"
= "noimage.jpg"
else
objRS("Picture Server Path"
= PictureServerPath
objRS("Picture File"
= PictureFile
end If
else
objRS("Picture Server Path"
= UpdatePictureServerPath
objRS("Picture File"
= UpdatePictureFile
end If
end If
objRS.Update
If type_of_submit = "Amend" Then
objRS("ID Number"
objRS("Part Name"
objRS("Custodian"
objRS("Date Last Modified"
objRS("Date Added"
objRS("Country"
objRS("Part Application"
If PictureLocationField = "" then
If PictureServerPath = "" then
objRS("Picture Server Path"
objRS("Picture File"
else
objRS("Picture Server Path"
objRS("Picture File"
end If
else
objRS("Picture Server Path"
objRS("Picture File"
end If
end If
objRS.Update