.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Is returning ArrayList of Datasets good practice?

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net


I am requesting data via an API which returns an XML every time. Then I need to analyse this XML and keep some of its elements.

I save that XML to a DataSet.

However, I need multiple calls to get multiple responses, and then group the elements from the various responses together, for example:


This would be a typical XML response. I need to get the myData field from say 10 different XML.

Now, I've been putting every XML response in a new DataSet and creating an ArrayList which holds them, and then itterate through the DataSets. I find this quite slow, and I think (correct me if I'm wrong) that DataSet it's an expensive means as far as memory is concerned.

What would you advice me to use in this occasion?


View Complete Post

More Related Resource Links

Is it a good practice to use DataContract attributes on business entities

Hi Folks, Currently I am developing a framwork for travel industry and finally my framework will expose its operations in the form of WCF Service. I was wondering if it is a good idea to decorate your entities and class with DataContract attributes. I know this is required if you want your classes/fields to be serialized/deseralized.  However, by Adding these attributes mean you are making your entities service specific which I believe not a good idea. Service and domain specific entities should be seperate. One solution to this would be to make DTOs and decorate them with these attributes and this make sense as core purpose of these DTOs is serialization and deserialization. What can be other options....? Please share your thoughts. Thanks, Naeem

SSIS - Adjusting command timeout (good or bad practice)

Hi,   I'm building a bank reconciliation process where I'm leveraging SSIS to import, transform and insert data into a database.  I had a command timeout error at the transformation segment (Derived Column methods). At first was it difficult to determine (Ambigious SSIS errors), but in the end was easy to resolve.  I simply increased the timeout duration. Being a developer, I find this to be bad practice as the application should be optimized as much as possible prior to making a timeout adjustment.  An ideal method would have been to cache more data prior to calling the database command, so the data is available for processing and not keeping the command open unnecessarily. I'm relatively new to SSIS, but have been unable to determine a method to remove the transformation bottleneck. I could do it easily enough with customized .NET code, but I'd prefer not to do that.  My question - There must be a method in SSIS that buffers the data originating from the transformation prior to calling my INSERT to database method?   Thank you,   Russ

Will it be a good practice to submit form data through web service method?



I am trying to submit my form's data to database using asmx Web Service method(Through AJAX extension methods i.e., Script callback method). My form contains lot of data, though only text data.This will be a very fast process,but still i want to get some advice from you expert persons that should i processd in the same way ?Or should i submit form data in the traditional way ?

Please give proper reason for your answer.

which one is the good practice to consume WCF/Web Service in client side ?



There are so many method to consume webservice/WCF in client side, like using Jquery and Ajax Scriptmanger. Which one is good practice to implement in

project and why ? could you share your opinion ?


Thank you

Typed DataSets in .NET

we can specify the data type when we create a DataColumn for a DataTable. This is to enforce the runtime type-safety for the column so that only data of specified data type can be stored in the column

UnTyped DataSets and Strongly Type DataSets

We all are use datasets as a means of carrier of data from one layer to another. Most of the time we are using weakly typed datasets. In this article I will explain the differences between weakly typed datasets and strongly type datasets

Returning a DataSet From a Web Services: Step-by-Step

This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.


This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.

How to bind TemplateField DropDownList with ArrayList?


Hi Expert!

  I'm trying gridview templateField DropDownList bind with arraylist. When i set bindsource i got this error. "//Error Object reference not set to an instance of an object."

My Sample .aspx

<asp:TemplateField HeaderText="Type">
                        <asp:DropDownList ID="_grvcboType" runat="server" Width="117px" DataTextField="Display" DataValueField="Value">
                        <asp:Label ID="Label7" runat="ser

Good way to do a Many-to-Many relationship?


I've used the automatic  Many-to-Many generation as described here: http://msdn.microsoft.com/en-us/library/dd742359.aspx

But that doesn't seem to allow a quantity to be attached to orders (in the example it would be courses). I have many customers and many products, I would like a customer to be able to order more than one product. Right now I get a grid of checkboxes. I would like instead a field where I could enter a number. 

Is this possible?

Returning datas from two excel file



I used the below code to return the datas from one excel file. My question is if i suppose need to get the records from morethan one excel file using joins, how it is possible.

   string connString = ConfigurationManager.ConnectionStrings["xls"].ConnectionString;
        // Create the connection object 
        OleDbConnection oledbConn = new OleDbConnection(connString);
         // Open connection
            // Create OleDbCommand object and select data from worksheet Sheet1
            OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", oledbConn);
            // Create new OleDbDataAdapter 
            OleDbDataAdapter oleda = new OleDbDataAdapter();
            oleda.SelectCommand = cmd;
            // Create a DataSet which will hold the data extracted from the worksheet.
            DataSet ds = new DataSet();
            // Fill the DataSet from the data extracted from the worksheet.
            oleda.Fill(ds, "Employees");




Query an arraylist of array list using linq


I have an array list called Customer. I t holds a list of array list which has the account details.

proj.customer -> collection of arraylist of type customer

proj.customer.account -> collection of arraylist of type account

Account array list holds type account and it has a poperty account balance. How can I query all accounts which has account balance  >100

I tried the following one

var Accountlist= from Account accountdetails in proj.customer.account

where accountid.balance >100

select accountdetails.id

But it is always throwing an error saying cannot cast type customer to type account

Please help

ArrayList.ToArray fails!


In my app, I have code similar to the following:



               ArrayList alStartFrames = new ArrayList();
                byte[] abytTest = { 1, 2 };


                byte[] abytCombinedFrame = (byte[])alStartFrames.ToArray(typeof(byte));

            catch (Exception ex)

The call to ToArray always fails and the exception is caught even though I'm pretty sure alStartFrames is an array list of byte arrays. Anyone have any insight on why this is happening?! TIA

Usability in Practice: The Decade of Convergence


As devices converge, user experience design needs to change, too.

Dr. Charles B. Kreitzberg

MSDN Magazine April 2010

Patterns in Practice: Internal Domain Specific Languages


Jeremy Miller explains how internal Domain Specific Languages can help you craft code that is easier to read and write. His bag of tricks to improve your programming includes extension methods, fluent interfaces, object extensions and use of the semantic model.

Jeremy Miller

MSDN Magazine January 2010

Usability in Practice: More Than Skin Deep


While style and slick visuals are important in Web site design, they shouldn't detract from a site's usability and functionality. Here are some hands-on tips for look and feel, readability, discovery of affordances, and more, with plenty of examples of good and bad design.

Ambrose Little, Charles B. Kreitzberg

MSDN Magazine December 2009

Usability in Practice: Search Is Key to Findability


In this column, Ambrose Little and Charlie Kreitzberg discuss best practices, design patterns, and other considerations related to implementing a search feature.

Ambrose Little, Charles B. Kreitzberg

MSDN Magazine November 2009

Patterns in Practice: Functional Programming for Everyday .NET Developers


This article examines how the new support for functional programming techniques in .NET 3.5 can developers make code more declarative, reduce errors in code, and write fewer lines of code for many common tasks.

Jeremy Miller

MSDN Magazine October 2009

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend