Megan
Posts: 35
|
Posted: 06/06/2008, 4:40 PM |
|
If I've missed this somewhere in the forums, I apologize.
I'm using SQL Server 2005 with a table that has a field called "FileName". In my form, I have the file upload component and in the Control Source of the file upload component I entered "FileName". When I run the page, the file is uploading fine but the record is not getting updated in my table with the file name. My users need to refer back to that image for a particular record.
I've dug everywhere in the forums and I've found where some had the same question, resolved it, but didn't post how they resolved it. Can anyone help me with some sample, guidance, anything? I've been working on this whole file upload thing for weeks now and it's driving me nuts.
|
|
|
GeorgeS
Posts: 206
|
Posted: 06/07/2008, 6:15 PM |
|
Megan,
I had many problems with FileUpload component when I was using asp.
Without seeing your CCS page it is hard to tell what's wrong.
1. I'd recommend changing that DB field from FileName into something less resembling a combination of reserved words. To avoid using reserved words by mistake I usually create short prefixes: for Table "USERS" - letter "u" for each field like u_ID, u_name, u_FileName...
2. make sure that you SELECT your field name from the dropdown list in the Control Source - typing in field names doesn't work if they are not in the list already
3. post your code and DB table structure if you need more help...
_________________
GeorgeS |
|
|
Megan
Posts: 35
|
Posted: 06/09/2008, 5:06 PM |
|
Thank you so much for your help and advice. I actually figured out where I goofed up (user error), and it's working fabulously now. In case anyone is interested, I've accomplished the following on a file upload (using Persits):
1. Upload a file
2. When the file uploads, it also creates a copy of the file but in "thumbnail" size; the thumbnail of the uploaded file shows next to the Upload component
3. When deleting the image using the checkbox, it also deletes the thumbnail file
4. When deleting the record it deletes all images related to that record.
I'm sure others have figured this out as well; I'm just pretty thrilled with myself for getting this done!
|
|
|
Chris__T
Posts: 339
|
Posted: 06/11/2008, 12:59 PM |
|
Congrats! That sounds like a really cool feature that you were able to implement.
|
|
|
|