Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Doubt between DataSet or ArrayList 1

Status
Not open for further replies.

pajarokillo

Programmer
May 3, 2004
30
0
0
ES
Hi!, i am doing a web application that will be it a Extranet.My doubt is the following, for example, you assume that i want to fill a dropdownlist with client's information, i don't know that is better and best performance, if from my logic layer to return a DataSet with the client's information or to return a ArrayList of objects of type Client and to fill the dropdownlist with the ArrayList. With the first option, my data access layer should be to return a DataSet, and with the second option it should be to return a SqlDataReader and to build a ArrayList, but i had read that the data access is more efficient to use a SqlDataReader than a DataSet. Can you help me to resolve this doubt?, thanks.
 
You could also use it if you want to join records from a database to a flat file (e.g. a csv file).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
but that is very rare (i have never done that). i want some examples of common operations...

Known is handfull, Unknown is worldfull
 
but that is very rare (i have never done that)
Just because you haven't had the need to do it doesn't mean it'r rare! I come across situations like this fairly frequently on our current contract. What is a common operation to you may be something that others never come across and vice versa.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
k, other than this i can assume others can be done using a DataReader...

Known is handfull, Unknown is worldfull
 
Yes (as long as only one "recordset" is returned and you don't need to read records more than once, in which case you'll have to implement a workaround such as the one suggested by tgreer).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
thanks...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top