473,657 Members | 2,437 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.HasR ows)
{
while(drPages.R ead())
{
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 1310
ArrayList alPages = new ArrayList();

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

Nov 17 '05 #2

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

Similar topics

2
1764
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 array). So if they are in a page were they already voted, they won't have the option to do so. The idea is that the session cookie lasts "forever", I don't want them voting for the same game everytime they get to the site. This isn't soo strict,...
7
1463
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 members of type List<FamilyMembers> since an array is unsuitable for the task (unless I'm much mistaken array sizes can't be modified on runtime, can they?). Now I'm asking myself if there isn't a better way to handle this problem, since it's a...
2
2023
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 tell, it should work but it doesn't. Can someone tell me where I went wrong? <html><head> <title>Form Test</title> <script language="JavaScript> <!-- function copy(){
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
2449
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 nightmare. There are of course many solutions, but they all end up forcing you to abandon the array syntax in favour of macros or functions. Now I have two questions - one is historical, and the other practical. 1.) Surely malloc (and...
3
2331
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() = DirectCast(Session("EventTypes"), String()) If Date.Today <= closeDate Then If eventTypes(cblEntries.SelectedIndex) = "J" Then thisFee = Session("JRFee") Else thisFee = Session("PEFee") Else If eventTypes(cblEntries.SelectedIndex) = "J" Then thisFee =
2
2534
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, 1stitem,2nditem,3rditem,4thitem, ..., nthitem What would be the best way of storing the above string into an array like
20
4626
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
1129
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 data in c#. How its possible in Sql Server.
3
1379
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 Student ID. Now the program to run as a samle of this class will store the first Student I get and put it into slot of my array and then I increment my NumStudents, as a count to moveon to the next array slot. The problem is that it only puts the...
0
8310
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,...
0
8826
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, 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...
0
8732
jinu1996
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...
1
8503
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,...
1
6166
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4155
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...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1615
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.