-
How to create an array of an indeterminate number of classes
I have an ADO+ DataReader I am iterating through to populate an array of
classes. I don't know how many records I will get back so how do I
dimension the array.
What is the c# equivalent of a collection?
-
Re: How to create an array of an indeterminate number of classes
Why create your own array to hold the records? why not use the
dataset/datatable?
"Chris Kinsman" <ckinsman@devx.com> wrote in message
news:3986fca3@news.devx.com...
> I have an ADO+ DataReader I am iterating through to populate an array of
> classes. I don't know how many records I will get back so how do I
> dimension the array.
>
> What is the c# equivalent of a collection?
>
>
>
>
-
Re: How to create an array of an indeterminate number of classes
It is a compound structure. I could create a "shaped" recordset I guess to
hold the master-detail style data I am trying to model...
"news.devx.com" <kaisert@earthlink.net> wrote in message
news:398740e0@news.devx.com...
> Why create your own array to hold the records? why not use the
> dataset/datatable?
>
>
>
> "Chris Kinsman" <ckinsman@devx.com> wrote in message
> news:3986fca3@news.devx.com...
> > I have an ADO+ DataReader I am iterating through to populate an array of
> > classes. I don't know how many records I will get back so how do I
> > dimension the array.
> >
> > What is the c# equivalent of a collection?
> >
> >
> >
> >
>
>
-
Re: How to create an array of an indeterminate number of classes
The dataset enables you to create multiple tables and build relationships
between them.
So, I could have a table called "customer" and a table called "Orders" with
a relationship between them.
Then through the object model I could traverse the relationship to get all
of the associated order for customer 1.
I fill/update the table by using a datasetcommand (ADODataSetCommand or
SQLDataSetCommand).
The dataset gives you a simple programming model over relational and
hierarchical data.
"Chris Kinsman" <ckinsman@devx.com> wrote in message
news:39874232$1@news.devx.com...
> It is a compound structure. I could create a "shaped" recordset I guess
to
> hold the master-detail style data I am trying to model...
>
> "news.devx.com" <kaisert@earthlink.net> wrote in message
> news:398740e0@news.devx.com...
> > Why create your own array to hold the records? why not use the
> > dataset/datatable?
> >
> >
> >
> > "Chris Kinsman" <ckinsman@devx.com> wrote in message
> > news:3986fca3@news.devx.com...
> > > I have an ADO+ DataReader I am iterating through to populate an array
of
> > > classes. I don't know how many records I will get back so how do I
> > > dimension the array.
> > >
> > > What is the c# equivalent of a collection?
> > >
> > >
> > >
> > >
> >
> >
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks