Data Readers

Discussion in 'ASP .Net' started by Tom Nowak, Jul 2, 2010.

  1. Tom Nowak

    Tom Nowak Guest

    Trying to develop an asp.net. I want to use a data reader to read a list of
    categories from a table. I then want to use another data reader to read
    another table and give me a count of records that include the category found
    in the first data reader. I want to do this for every category found in the
    first data reader.
    Any ideas? Please help.
     
    Tom Nowak, Jul 2, 2010
    #1
    1. Advertising

  2. Tom Nowak

    Mr. Arnold Guest

    Tom Nowak wrote:
    > Trying to develop an asp.net. I want to use a data reader to read a list of
    > categories from a table. I then want to use another data reader to read
    > another table and give me a count of records that include the category found
    > in the first data reader. I want to do this for every category found in the
    > first data reader.
    > Any ideas? Please help.


    Why don't you just use LINQ to query the tables? By using a foreach loop
    after you query for data in the first table using LINQ, you can walk the
    results in a foreach loop and query the second table using LINQ.

    What is Language Integrated Query?

    LINQ is a Microsoft .NET Framework component that adds native data
    querying capabilities to .NET languages.

    Microsoft LINQ defines a set of query operators that can be used to
    query, project and filter data in arrays, enumerable classes, XML,
    relational database, and third party data sources. While it allows any
    data source to be queried, it requires that the data be encapsulated as
    objects. So, if the data source does not natively store data as objects,
    the data must be mapped to the object domain. Queries written using the
    query operators are executed either by the LINQ query processing engine
    or, via an extension mechanism, handed over to LINQ providers which
    either implement a separate query processing engine or translate to a
    different format to be executed on a separate data store (such as on a
    database server as SQL queries). The results of a query are returned as
    a collection of in-memory objects that can be enumerated using a
    standard iterator function such as C#'s foreach.
    Many of the concepts that LINQ has introduced were originally tested in
    Microsoft's Cω research project. LINQ was released as a part of .NET
    Framework 3.5 on November 19, 2007.

    http://en.wikipedia.org/wiki/Language_Integrated_Query

    <http://dotnetarchitect.wordpress.com/2009/03/18/using-linq-to-manipulate-data-in-datasetdatatable/>

    <http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx>
     
    Mr. Arnold, Jul 2, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. blue

    Passing around open readers

    blue, Jan 23, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    443
    Sharon
    Mar 6, 2004
  2. Andrew Kidd
    Replies:
    3
    Views:
    483
    Andrew Kidd
    Apr 22, 2004
  3. Jesse Liberty
    Replies:
    2
    Views:
    315
  4. Jesse Liberty

    Alpha Readers Wanted

    Jesse Liberty, Apr 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    340
    Jesse Liberty
    Apr 7, 2005
  5. Andrew Kidd

    multiple dropdown lists = multiple data readers???

    Andrew Kidd, Apr 20, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    189
    Andrew Kidd
    Apr 21, 2004
Loading...

Share This Page