PC Review


Reply
Thread Tools Rate Thread

Adding to A Collection

 
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      31st Oct 2007
Hi -

Here's my latest question. I have created a collection. When I add to that
collection, i use an array to populate from a text file delimited by a pipe
(|):

arrDATA(x) = Split(strNextLine,"|"
collDATA.Add KEY:=strNextCollKey, Item:=arrDATA(x)

So the collection item will take the length of the array. Later, I would
like to attach more data to that collection item, thus increasing it's
length. How can this be accomplished? Do I have to remove the item and add
it again?

--
Thanks!
Max
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      31st Oct 2007
If the item is an array yes you do. But why do it that way. why not add each
array item as a single collection item, then you just add new ones without
worrying what is there.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Max" <(E-Mail Removed)> wrote in message
news:269BBA15-493A-46AB-B26A-(E-Mail Removed)...
> Hi -
>
> Here's my latest question. I have created a collection. When I add to
> that
> collection, i use an array to populate from a text file delimited by a
> pipe
> (|):
>
> arrDATA(x) = Split(strNextLine,"|"
> collDATA.Add KEY:=strNextCollKey, Item:=arrDATA(x)
>
> So the collection item will take the length of the array. Later, I would
> like to attach more data to that collection item, thus increasing it's
> length. How can this be accomplished? Do I have to remove the item and
> add
> it again?
>
> --
> Thanks!
> Max



 
Reply With Quote
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      31st Oct 2007
I guess I could, but I have a lot of data (15000+ lines) and about 20
"columns" for each line. So I'm trying to use the "2-D" capability of the
collection. Perhapse I'm just not seeing the benefit of assigning each bit
of data as a new collection item... Could you ellaborate?


--
Thanks!
Max


"Bob Phillips" wrote:

> If the item is an array yes you do. But why do it that way. why not add each
> array item as a single collection item, then you just add new ones without
> worrying what is there.
>
> --
> ---
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
>
>
>
> "Max" <(E-Mail Removed)> wrote in message
> news:269BBA15-493A-46AB-B26A-(E-Mail Removed)...
> > Hi -
> >
> > Here's my latest question. I have created a collection. When I add to
> > that
> > collection, i use an array to populate from a text file delimited by a
> > pipe
> > (|):
> >
> > arrDATA(x) = Split(strNextLine,"|"
> > collDATA.Add KEY:=strNextCollKey, Item:=arrDATA(x)
> >
> > So the collection item will take the length of the array. Later, I would
> > like to attach more data to that collection item, thus increasing it's
> > length. How can this be accomplished? Do I have to remove the item and
> > add
> > it again?
> >
> > --
> > Thanks!
> > Max

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding to a collection in Net vs VB6 ... Mike Microsoft VB .NET 6 7th Feb 2008 02:31 PM
Adding class object to collection repeats same object through collection? Erazmus Microsoft Excel Programming 2 17th Sep 2007 04:35 AM
adding collection to another collection... Adam Right Microsoft C# .NET 4 8th Sep 2007 07:13 PM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Øyvind Isaksen Microsoft ASP .NET 1 18th May 2007 10:24 AM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Øyvind Isaksen Microsoft Dot NET 1 18th May 2007 10:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:30 AM.