PC Review


Reply
Thread Tools Rate Thread

Data Readers

 
 
Tom Nowak
Guest
Posts: n/a
 
      2nd Jul 2010
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.
 
Reply With Quote
 
 
 
 
Mr. Arnold
Guest
Posts: n/a
 
      2nd Jul 2010
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>
 
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
Problem with Data Readers and connections =?Utf-8?B?U29tZXNo?= Microsoft ADO .NET 1 28th Mar 2007 08:26 AM
Multi-threaded apps and data readers Smokey Grindle Microsoft ADO .NET 5 23rd May 2006 08:56 PM
newsgroup readers vs. web-based readers =?Utf-8?B?UG9yUVB5bmU=?= Windows XP General 4 14th Apr 2004 06:16 PM
C++ recordsets vs. C# data readers lakshmi Microsoft C# .NET 1 16th Oct 2003 10:41 PM
Which are the best news readers and mail readers? WHY? LittleMac Freeware 33 10th Sep 2003 03:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:19 AM.