473,398 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

return recordset of images in specific cells in a table

Hello folks,

I have an interesting problem and am looking for some advice. I am
hoping to build an asp whereby records are pulled from SQL Server. These
records will be merely file locations for thumbnail images I hope to display
in a grid. Rather than having a grid be constructed row-to-row, I was
wondering if it is at all possible to dynamically construct this grid as a
table of thumbnails whereby each cell (perhaps 5-6 columns across)
represents one record? I have no idea how one would construct this loop that
spans columns AND rows rather than just rows.

Thanks for any ideas,

Dave

--
______________________________
Remove "_SPAM" to reply directly.
Jul 22 '05 #1
5 1480
Gazing into my crystal ball I observed "David Shorthouse"
<davidshorthouse@shaw_SPAM.ca> writing in
news:eJ**************@TK2MSFTNGP14.phx.gbl:
Hello folks,

I have an interesting problem and am looking for some advice. I am
hoping to build an asp whereby records are pulled from SQL Server.
These records will be merely file locations for thumbnail images I hope
to display in a grid. Rather than having a grid be constructed
row-to-row, I was wondering if it is at all possible to dynamically
construct this grid as a table of thumbnails whereby each cell (perhaps
5-6 columns across) represents one record? I have no idea how one would
construct this loop that spans columns AND rows rather than just rows.

Thanks for any ideas,

Dave

Do something like:

<% columns = 5 'how many columns do you want?%>
<table summary="thumbnail gallery">
<tbody>
<% 'get the records
'start a loop
counter = counter + 1
imgsrc = rs(fieldvalue)
desc = rs(description of image if there is one) %>
<td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
<% rs.Movenext
if columns mod counter = 0 then
%>
</tr>
<% if not rs.EOF then%>
<tr>
<% end if%>
<% end if %>
</tbody>
</table>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #2
Thanks! I'll give it a go.

Dave

--
______________________________
Remove "_SPAM" to reply directly.
Hello folks,

I have an interesting problem and am looking for some advice. I am
hoping to build an asp whereby records are pulled from SQL Server.
These records will be merely file locations for thumbnail images I hope
to display in a grid. Rather than having a grid be constructed
row-to-row, I was wondering if it is at all possible to dynamically
construct this grid as a table of thumbnails whereby each cell (perhaps
5-6 columns across) represents one record? I have no idea how one would
construct this loop that spans columns AND rows rather than just rows.

Thanks for any ideas,

Dave

Do something like:

<% columns = 5 'how many columns do you want?%>
<table summary="thumbnail gallery">
<tbody>
<% 'get the records
'start a loop
counter = counter + 1
imgsrc = rs(fieldvalue)
desc = rs(description of image if there is one) %>
<td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
<% rs.Movenext
if columns mod counter = 0 then
%>
</tr>
<% if not rs.EOF then%>
<tr>
<% end if%>
<% end if %>
</tbody>
</table>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 22 '05 #3
Adrienne,

It was a good start, but doesn't work. Any chance you can scrutinize your
code again. In particular, I don't know where to put the "loop". The result
of your code is one column of images instead of being spread across columns
and rows.

Thanks for any additional suggestions,

Dave
______________________________
Remove "_SPAM" to reply directly.
"Adrienne" <ar********@sbcglobal.net> wrote in message
news:Xn****************************@207.115.63.158 ...
Gazing into my crystal ball I observed "David Shorthouse"
<davidshorthouse@shaw_SPAM.ca> writing in
news:eJ**************@TK2MSFTNGP14.phx.gbl:
Hello folks,

I have an interesting problem and am looking for some advice. I am
hoping to build an asp whereby records are pulled from SQL Server.
These records will be merely file locations for thumbnail images I hope
to display in a grid. Rather than having a grid be constructed
row-to-row, I was wondering if it is at all possible to dynamically
construct this grid as a table of thumbnails whereby each cell (perhaps
5-6 columns across) represents one record? I have no idea how one would
construct this loop that spans columns AND rows rather than just rows.

Thanks for any ideas,

Dave

Do something like:

<% columns = 5 'how many columns do you want?%>
<table summary="thumbnail gallery">
<tbody>
<% 'get the records
'start a loop
counter = counter + 1
imgsrc = rs(fieldvalue)
desc = rs(description of image if there is one) %>
<td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
<% rs.Movenext
if columns mod counter = 0 then
%>
</tr>
<% if not rs.EOF then%>
<tr>
<% end if%>
<% end if %>
</tbody>
</table>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 22 '05 #4
Adrienne,

Got it all fixed-up and works a treat now.

Dave

--
______________________________
Remove "_SPAM" to reply directly.
"Adrienne" <ar********@sbcglobal.net> wrote in message
news:Xn****************************@207.115.63.158 ...
Gazing into my crystal ball I observed "David Shorthouse"
<davidshorthouse@shaw_SPAM.ca> writing in
news:eJ**************@TK2MSFTNGP14.phx.gbl:
Hello folks,

I have an interesting problem and am looking for some advice. I am
hoping to build an asp whereby records are pulled from SQL Server.
These records will be merely file locations for thumbnail images I hope
to display in a grid. Rather than having a grid be constructed
row-to-row, I was wondering if it is at all possible to dynamically
construct this grid as a table of thumbnails whereby each cell (perhaps
5-6 columns across) represents one record? I have no idea how one would
construct this loop that spans columns AND rows rather than just rows.

Thanks for any ideas,

Dave

Do something like:

<% columns = 5 'how many columns do you want?%>
<table summary="thumbnail gallery">
<tbody>
<% 'get the records
'start a loop
counter = counter + 1
imgsrc = rs(fieldvalue)
desc = rs(description of image if there is one) %>
<td><img src="<%=imgsrc%>" alt="<%=desc%>"></td>
<% rs.Movenext
if columns mod counter = 0 then
%>
</tr>
<% if not rs.EOF then%>
<tr>
<% end if%>
<% end if %>
</tbody>
</table>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jul 22 '05 #5
Gazing into my crystal ball I observed "David Shorthouse"
<davidshorthouse@shaw_SPAM.ca> writing in news:eZ#MnRefFHA.1148
@TK2MSFTNGP12.phx.gbl:
Adrienne,

Got it all fixed-up and works a treat now.

Dave


Glad I was able to help. It works for printing labels, too.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Adrian Parker | last post by:
Hi. I would like to query a database, given several where clauses to refine my search, and return the value of one single field in the database. eg: I have a table that lists teachers. Their...
4
by: Bryan | last post by:
I have a results table that is 5 columns wide. the recordset is returned with 48 items. I have no problem displaying 5 per row until I hit the last row where i get a ADODB.Field error '80020009' ...
5
by: PJ | last post by:
My challenge is to have the header of my page have 3 images...one in the top left, one in the top right ( always aligned to the right side of the browser ) and one image in the middle that repeats...
1
by: | last post by:
Hi Everyone Here is my dilemma I have a database within that, two tables products and images. They are related by product_id. I have designed it so that one product can have many images...
16
by: Peter Maas | last post by:
The XHTML file below creates a 2x2 matrix of square images. There is always some space at the bottom borders of the cells (when rendered with Gecko and KHTML, not with IE) and I've found no way so...
13
by: moondaddy | last post by:
Happy Holidays All! I want to load a datagrid with images and text (Image, text, image, text, etc...). The data for this datagrid will be coming from sql server and the images are stored as files...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
16
by: haft | last post by:
I have posted this question on a javascript forum as it contains javascript code however it was believed to be an asp issue. The following head section javascript code contains the function...
6
by: SethM | last post by:
I have a stored procedure that returns a record set. I want to functionalize this so I can have multiple presentations of the same record set. However, I can not get rs_event.open StoreProc to pass...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.