Click to See Complete Forum and Search --> : Can ASP.NET Parse Image File Names To MS SQL Database?


blastbum
09-26-2006, 09:58 PM
Hi,

I'm in a bit of a sticky situation here at the moment. I've got a e-commerce website that has a product image allocated for each product listed on the site. The problem is, that the link has been lost between all of the product records and the images located on the server, so there are no images being displayed for each product. The error that has caused this has been resolved, but there are thousands of these images and it would be a major pain if the client had to individually add these images back to their respective products. Is it possible that if each of the jpg images were named as the product number, that the backend could simply parse or add each jpg image by the product name that's been named by and add it to each product on the database with the same product number?

At the moment, my developer who is working on this is asleep on the other side of the world and I need to know whether this could be possible so I could let my client know that it is possible now, without having to wait another 8 hours before I could ask my developer whether it's possible.

My developer is using ASP.NET 2.0 with MS SQL Server 2003.

Your feedback would be greatly appreciated.

Thank you,

Blastbum :)

sirpelidor
09-26-2006, 10:41 PM
it would be a major pain if the client had to individually add these images back to their respective products.

Is it possible that if each of the jpg images were named as the product number



Hi, maybe I'm not understanding your problem here. But base on what I'm reading, you still have to update each image filename individually.

Please let us know if there are information we are missing, otherwise it could be a greater pain if you have to renaming all the image filename. Especially when you have over 1k files sitting in your harddrive, you can't affort to make any errors.

blastbum
09-26-2006, 11:39 PM
Hi sirpelidor,

I've just had confirmation that the product images are actually named by the product number (or product code). Yes, previously we have had to upload each product image (jpg file) individually for each product in the database inventory. Very painstaking.

sirpelidor
09-26-2006, 11:45 PM
the product images are actually named by the product number (or product code)

as long as your product code is a unique id number which is sitting at your db, you should have no problems.

just go ahead and prase part of the file name when user click on that image, by httpget or httppost, and have .net use that as key id to query the table and display to info.

good luck.