473,503 Members | 10,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storing a variable in an Array.

Hi Sirs,
I have the following code:

//Method LinksPages()
if(drPages.HasRows)
{
while(drPages.Read())
{
string strAdress = "<a href='" + drPages["Adress"] + "'>" + drPaginas["Page"] + "</a> &nbsp;&nbsp;"; //This should be an Array
}
}
This is a method and when I call it, It should return: "Home Careers Contact......"

But It returns just the last record: Contact

How do I store all the records in an array ? How do I call this method as an array ?

Thanks

Daniel

Nov 17 '05 #1
1 1304
ArrayList alPages = new ArrayList();

while(drPages.Read())
{
string strAdress = "<a href='" + drPages["Adress"] + "'>" +
drPaginas["Page"] + "</a> &nbsp;&nbsp;"; //This should be an Array
alPages.Add(strAddress);
}

Nov 17 '05 #2

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

Similar topics

2
1756
by: Francisco | last post by:
I have this problem: I have a database with information about games, and users are able to vote for them. Everytime a user votes for a game I store the unique game name into a session variable (an...
7
1458
by: Snyke | last post by:
Well my problem is simple: I have a class which has a variable number of members. Lets say I have a class Family and a variable number of FamilyMembers. Until now I used a member of Family called...
2
2016
by: Mark Hannon | last post by:
I am trying to wrap my brain around storing form elements inside variables & arrays before I move on to a more complicated project. I created this simple example to experiment and as far as I can...
5
411
by: matevz bradac | last post by:
Hi, I'm trying to implement delayed function execution, similar to OpenGL's display lists. It looks something like this: beginList (); fcn1 (); fcn2 ();
22
2425
by: Wynand Winterbach | last post by:
I think every C programmer can relate to the frustrations that malloc allocated arrays bring. In particular, I've always found the fact that the size of an array must be stored separately to be a...
3
2324
by: Brad | last post by:
I am storing an array which contains about a dozen chracter items to a Session variable. Later, I need to use this array so I am doing the following: Dim eventTypes As String() =...
2
2519
by: gh | last post by:
Hi, I have a string variable which contains n number of comma delimited elements and I would like to store each element into an array but I could not figure how to do it. for example,...
20
4608
by: Martin Jørgensen | last post by:
Hi, I'm reading a number of double values from a file. It's a 2D-array: 1 2 3 4 5 6 7 ------------- 1 3.2 2 0 2.1 3 9.3 4
0
1124
by: sudhaMurugesan | last post by:
Hi, I am having single column with multiple rows and i want to store all rows into a single variable (like array variable). For example, we can use array for storing multiple...
3
1372
by: kjkrudh | last post by:
Hi, Here I am again with more questions. I am groveling for help. I am working on a program in Netbeans 5.5.1 where I created a class called Student that gets and sets Last Name, First Name and...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
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
7294
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
5602
agi2029
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,...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
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 ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.