PC Review


Reply
Thread Tools Rate Thread

DataReader Problem

 
 
=?Utf-8?B?VklKQVkgS1VNQVI=?=
Guest
Posts: n/a
 
      21st Feb 2005
Hi,

Problem: Return ArrayList where Values are Added using DataReader.

Note: My Data Reader returns M Columns and N Rows

I am using DataReader in Data Access layer. I want to return this result to
Business Layer. But, considering performace and Efficiency, I have to Close
the DataReader Connection.

If I return this Datareader, again I need to open connection in Business
Layer, which is not good.

I tryinh to use ArrayList to return. But as of I know, we cant create Muti
Dimentional Array List

I really appreciate your Help......

 
Reply With Quote
 
 
 
 
Chris, Master of All Things Insignificant
Guest
Posts: n/a
 
      21st Feb 2005
Is there something wrong with using a DataTable? This is the client side
storage that ADO.NET uses. You could use a DataAdapter and use the fill
command to fill up the datatable for you but you will take on the overhead
of a dataset and you may not need that. Otherwise just iterate through the
datareader and create the datatable on the fly. That's what the dataadapter
would do anyhow.

Chris



"VIJAY KUMAR" <(E-Mail Removed)> wrote in message
news8A95B50-F67B-4B81-B25B-(E-Mail Removed)...
> Hi,
>
> Problem: Return ArrayList where Values are Added using DataReader.
>
> Note: My Data Reader returns M Columns and N Rows
>
> I am using DataReader in Data Access layer. I want to return this result
> to
> Business Layer. But, considering performace and Efficiency, I have to
> Close
> the DataReader Connection.
>
> If I return this Datareader, again I need to open connection in Business
> Layer, which is not good.
>
> I tryinh to use ArrayList to return. But as of I know, we cant create
> Muti
> Dimentional Array List
>
> I really appreciate your Help......
>



 
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
How to process datareader nulls coming from datareader? JB Microsoft C# .NET 4 3rd Nov 2008 12:56 AM
Datareader Problem Bernie Hunt Microsoft ADO .NET 2 9th Mar 2006 03:23 PM
SQL Datareader problem Rykie Microsoft VB .NET 3 28th Sep 2005 10:55 PM
datareader problem =?Utf-8?B?aHV6eg==?= Microsoft ASP .NET 4 1st Nov 2004 01:47 PM
DataReader problem JR Microsoft ADO .NET 2 13th Oct 2004 03:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:52 AM.