HTML, ASP, and Access question

OK, I’m working on an ASP driven website. The Access database that feeds it contains a table with products, with fields like name, model number, description, and so forth. My client wants to add photos to the site. They are already embedded in the table with product descriptions, not ‘loose’ jpegs. I know how to retrieve the rest of the record, but how do I retrieve and display these photos? Many thanks for your help.

That’s your first mistake.

]quote]The Access database

[/quote]

And that’s your second.

I’m assuming the pictures are stored in the DB as BLOBs (or whatever the Access equivilent of that is). In that case, I imagine you could just have your script print a URL to a function that would retrieve the BLOB and send it out with the appropriate MIME-type (image/jpeg, I believe.)

That’s how I would do it with Perl or PHP and a MySQL database. I imagine there’s a similar procedure for ASP and Access.

A quick search of the MSDN Library turned up this:

http://support.microsoft.com/support/kb/articles/Q103/2/57.asp

I didn’t read the whole thing (due to a few beers). But if you want more help I am willing to assist. I am a MCSD, MCT and do alot of web/windows/java consulting. A great place to start is always msdn.microsoft.com . If you’re a windows dev’er its indispensable.

PS: Keep the faith bro. JAVA, Linux, etc ain’t all its cracked up to be.

I just finished a website just like this for a large company. Well, sorta. I spent considerable effort setting up a dynamic site, and then their sysadmins refused to support the database so the dynamic part got canned. Oh well…

But anyway, I’d suggest you get yourself a better database. Access isn’t going to handle anything but the lightest load. And I’d also suggest you get yourself a copy of Macromedia Dreamweaver UltraDev, which automagically programs database access. It even has live database links so you can preview data during authoring, which is VERY useful. You can get a 30 day free trial of UltraDev from the macromedia website. Even if you don’t end up using UltraDev, the docs will teach you all about building database-driven sites.

And as far as the MS apologist, yes, PHP, SQL, Java, and Linux ARE all they are cracked up to be. They’re easier to work with than MS’s botch-job products, they’re better documented, they’re have fewer bugs and are updated more frequently, they have better features than equivalent MS products, and they’re free. No server tax. The best way I can describe setting up an database driven website with Microsoft products is that it’s like trying to stack turds 6 feet high. It will fall over frequently and make a big mess. And when you are done, all you’re going to end up with is a stack of shit 6 feet high.

Chas.E, you are my new hero.

JamesCaroll: Thanks. I think I’ve got it figured out now. I tried MS’s site, but the search kept timing out (go figure).

Chas.E: Thanks for the advice on DreamWeaver. I’d heard good things about it, but hadn’t investigated yet. I will now. It’s a pretty small site, so I don’t think Access’s limitations will be a big deal. Besides, that’s what the client wants to run. :shrug:

friedo: Thanks for keeping up the “condescending Unix guru” stereotype. FWIW, I do use Java and Perl. I just don’t have to opportunity to use them in this case, as the client wants to be able to understand what I’m working on, and only uses MS products.

Just to clarify, it’s not Dreamweaver but Dreamweaver ULTRADEV that has the database features. If you just go out and buy Dreamweaver, you will not find any database features. You have to buy the Ultradev version, which contains all the regular DW features plus the database stuff.
There are lots of reasons I love DW, and lots of reasons I hate it. But it is the shortest path to a dynamic website.

Chas.E says:

Hmm. Can you elaborate a bit on its ups and downs? I haven’t read much literature on it, and I’m curious to hear a first hand account.