PC Review


Reply
Thread Tools Rate Thread

DataSets or Datareaders?!?!

 
 
Miguel Pais
Guest
Posts: n/a
 
      25th Jul 2003
Hello

Imagine you've an web page made by an ASP.NET web service
and the asp.net page itself.

All the Data retriving that the application does is made
using the webservice... when a web form is loaded the web
page calls several functions of the web service to get
the options to populate drop down boxes etc...

so far i've been using datasets returned from the web
service to the page.
example: in a form on dropdown box could have a list of
clients. In the web page, on form load, i invoke a
webmethod of my web service that returns a dataset to the
page with a table consisting of those records fetched. In
the page
I run over all the rows of the tablçe and populate the
dropdown box.

my doubt is: am i using ado.net right to do such things
or should
i return a datareader for the web page instead of a
dataset?!?!
is it good practice to works as i've been doing?!?!
its' not a waste of resources to have things done that
way?!?!

best regards

Miguel Pais
 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      25th Jul 2003
You mean not return a datareader from a web service - this object is not
serializable,

What would be faster is to return XML from the web service, and bind your
data to the XML.

"Miguel Pais" <(E-Mail Removed)> wrote in message
news:079801c3529d$1fb8e560$(E-Mail Removed)...
Hello

Imagine you've an web page made by an ASP.NET web service
and the asp.net page itself.

All the Data retriving that the application does is made
using the webservice... when a web form is loaded the web
page calls several functions of the web service to get
the options to populate drop down boxes etc...

so far i've been using datasets returned from the web
service to the page.
example: in a form on dropdown box could have a list of
clients. In the web page, on form load, i invoke a
webmethod of my web service that returns a dataset to the
page with a table consisting of those records fetched. In
the page
I run over all the rows of the tablçe and populate the
dropdown box.

my doubt is: am i using ado.net right to do such things
or should
i return a datareader for the web page instead of a
dataset?!?!
is it good practice to works as i've been doing?!?!
its' not a waste of resources to have things done that
way?!?!

best regards

Miguel Pais


 
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
using datasets vs. datareaders Microsoft ASP .NET 2 23rd Oct 2007 02:27 PM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com Microsoft ASP .NET 0 12th Apr 2006 10:07 AM
Philosophy Datasets vs. Datareaders Jim Hughes Microsoft ADO .NET 12 7th Feb 2005 02:49 PM
nTier question regarding DataSets and DataReaders Ryan Ternier Microsoft ASP .NET 5 10th Nov 2004 09:48 PM
DataReaders Vs DataSets John Smith Microsoft ADO .NET 18 5th Aug 2004 12:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:14 PM.