Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Displaying graphics in database search result ASP pages?

I'm building a database-driven website in FrontPage 2003, and I need to display graphics as a part of my search results in an ASP page. Although I'm an expert with Access, I'm not very well versed in ASP database programming. Please help!

Update:

They're OLE objects. Would it work better to use links to the images? What kind of code would I need for that? For further info, this is the code fragment that currently runs it, but it just displays [BINARY].

<!--webbot bot="DatabaseResultColumn" s-columnnames="ID,pic,bio,Name,Keyword" s-column="pic" b-tableformat="FALSE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1">&lt;&lt;</font>pic<font size="-1">&gt;&gt;</font>" startspan --><%=FP_FieldVal(fp_rs,"pic")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="5368" --><p> </td>

2 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    Are the images in the database (i.e., in an OLE wrapper as a field of the database) or are they outside the database and somehow keyed to some data in a field, such as a record number or text column holding the name / path of the image to be used?

    UPDATE:

    You can work with the images from the database itself but it requires you to create them on the fly with another ASPpage, which will actually do a binary read on your data and output it as an image.

    This tutorial is for old-school ASP, but can be modernized to ASP.NET fairly easily:

    http://www.4guysfromrolla.com/webtech/060100-1.sht...

    You can do it the other way, as well; generally speaking, it is easier and better for performance to work with static images you reference by a key.

  • ?
    Lv 4
    4 years ago

    considering the fact which you're utilising MYSQL, you need to use the parameter "shrink" on your sq. question. working example, exchange the question to: decide on * FROM weapon ORDER by ability of call shrink 0,10 The numbers advise: 0 - first result to reveal, 10 - sort of consequences to reveal. So, shrink 15, 8 would reveal consequences from num. 15 forward and return only 8 consequences. Your finaly question would then be "decide on * FROM weapon ORDER by ability of call shrink $initiate, 8". All that maintains to be is which you get the $initiate type from someplace - I advise a textbox only at the beginning and then paintings on some thank you to type pages such as you notice in maximum websites that reveal a great number of documents. additionally effective: Use the question "decide on count type(*) FROM weapon" to get the kind of entries in the table, then divide the type by ability of 8 and you're able to get the kind of pages you like. the main appropriate formula would truthfully be: /* do the traditional mysql_query, mysql_fetch_array.. and so on (be conscious: decide on count type returns only one row with only one documents merchandise so: */ $num_items = $row[0]; $num_pages =( $num_items / 8 ); for($i=0;$i<$num_pages;$i++) { print "<a href = $_SERVER['PHP_SELF']?website=$i>website $i</a>"; } and then upload your code, with the exchange: $result = mysql_query("decide on * FROM weapon ORDER by ability of call shrink $_GET['website'], 8"); only 2 issues to contemplate (i can not be bothered to) sort of pages isnt continually $num_items/8+a million. If $num_items/8 divides devoid of the rest, you're able to bypass +a million, if there's a the rest, regardless of the undeniable fact which you like one greater desirable website to reveal the remaninig rows. in case you call the region devoid of the ?website= parameter, it in all probability wont paintings, you're able to examine if the $_GET['website'] exists in the past you execute the mysql_query for decision. If it doesnt exist, i think of you're able to do $_GET['website'] = 0 - you're able to attempt it our. additionally, I havent truthfully examined any of the above code, so use it as one in each of those "instruction manual" on the thank you to do it because of the fact it in all probability wont paintings on the instant away.

Still have questions? Get your answers by asking now.