I have a table with many different fields in, including 40 separate image fields. ("Pic1" "Pic2" "Pic3" etc...)
each field has a single value (an image name) in, I need to be able to select all these fields as a single record and loop through them.
Something like - Select Pic1, Pic2, Pic3, Pic4, etc... From Gallery Where GalleryID = 123
Each gallery has a unique id in the table and has several different fields including a couple of text fields, and 40 different image fields.
Not every gallery will have 40 actual images in, so im looking to select all the image fields that actually have data for that gallery, and then to be able to count the number of images and loop through displaying them on the page.
Im not very good at programming, just a tiny little bit of self taught basic asp. So any help would be really appreciated.
3 3470
Im not sure I explained myself very clearly above.
After selecting the fields that I require from the table,
I want to be able to group them somehow as if they were all selected from a single field, and then count them, and loop through displaying them on the page one after the other.
I know how to select the fields I need, but it is the grouping, counting and looping through part I need guidance with.
Is that better explained?
I dont know if I should be using Array?
I could select all the fields I need then do something like: -
<%
-
Select Pic1, Pic2, Pic3, Pic4, Pic5, Pic6, Pic7, Pic8, Pic9, Pic10 From Gallery Where GalleryID = 123
-
%>
-
-
-
<%
-
Dim GalleryArray() 'Dynamic array
-
GalleryArray(0) = "rsGallery.Item("Pic1").value"
-
GalleryArray(1) = "rsGallery.Item("Pic2").value"
-
GalleryArray(2) = "rsGallery.Item("Pic3").value"
-
GalleryArray(3) = "rsGallery.Item("Pic4").value"
-
GalleryArray(4) = "rsGallery.Item("Pic5").value"
-
GalleryArray(5) = "rsGallery.Item("Pic6").value"
-
GalleryArray(6) = "rsGallery.Item("Pic7").value"
-
GalleryArray(7) = "rsGallery.Item("Pic8").value""
-
GalleryArray(8) = "rsGallery.Item("Pic9").value"
-
GalleryArray(9) = "rsGallery.Item("Pic10").value"
-
For Each item In GalleryArray
-
Response.Write(item & "<br />")
-
Next
-
%>
-
But that wouldnt count the number of images and I dont even know if it would display each image separately and allow me to control the layout?
Rabbit 12,516
Recognized Expert Moderator MVP
Is this the same question as your other thread?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Branden |
last post by:
hi guys,
i was wondering if it is possible to extract selected words in a
field to be put in different fields automatically. Do i have to write
the code in vb?
This is what im trying to do. Write now, i have emails that i
receive in outlook and i want to transfer them into a database. I
realized that i could export this. however, the BODY section of the
email is exported as one field. As the email i receive is a template
and it is...
|
by: Tony Dong |
last post by:
HI there
I make a data binding for list box, and it is multi selects, everything
working fine, but How can I get the multi select values in windows form?
I try many ways for HolidaysListBox.SelectedValue to get mult selected
values, but it looks not work for me, anyone has an idea for this?
Thanks
|
by: shaqattack1992-newsgroups |
last post by:
Hello Everyone,
At work, employees have been using a spreadsheet that I am trying to
import into an access database to make some reports. The problem I'm
having is that in the spreadsheet, they are storing the same type of
information in multiple cells. For example, for each machine in the
shop, there is a code for why the machine was down--A1, B1, C1...for
example. The spreadsheet is set up like this:
...
|
by: Mangler |
last post by:
Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value
How would I add those to fields? It may be my inexperience but when I
tried something like
rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value
didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.
|
by: R Bandeira |
last post by:
How to keep values in fields after ChangeMode to Insert from Edit? I
am implementing a re-insert type feature, after an edit.
// Change form to insert mode
FormView1.ChangeMode(FormViewMode.Insert);
// Repopulate the form
Label.Text = "12345";
TextBox.Text = "22";
| |
by: ataurrehman |
last post by:
I want to use select case in a loop as under:
Dim i As Integer
i = 1
While i < 6
Select Case Field1
Case "Title"
strFld(i) = "( & ': ' & )"
Case "Author"
strFld(i) = "( & ', ' & )"
|
by: adamjblakey |
last post by:
Hi,
I have a function here:
var AdminResponse = "";
function parseResponse(){
var nText = AdminResponse.getElementsByTagName('optionText');
|
by: perhapscwk |
last post by:
Sample tables (company_id RK companies.id):
Companies
id company
1 …
2 …
3 …
Locations
id company_id location revision
|
by: Raven7738 |
last post by:
Hey,
I'm using Access 2007. I have a code to open a new message in outlook 2007.
Private Sub btnEmail_Click()
Dim ol As Outlook.Application
Dim inbox As Folder
Dim msg As MailItem
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |