1: Database portability
2: Improved Performance on Database server as it has less work to do
The disadvantages...
1: Uncessarily comlicated to handle updates back to the database
If I am not concerned about database portability and the load on the
database server is small then would it be good practice to use datareaders
only in my asp.net application and update back to the database by stored
procedure. It seems so more easier...Yes.
--
http://www.openmymind.net/
"NH" <NH@.discussions.microsoft.com> wrote in message
news:E7E08185-7605-40E1-9EAF-E29AD493C528@.microsoft.com...
> Ok, the reasons I see for using them are:
> 1: Database portability
> 2: Improved Performance on Database server as it has less work to do
> The disadvantages...
> 1: Uncessarily comlicated to handle updates back to the database
> If I am not concerned about database portability and the load on the
> database server is small then would it be good practice to use datareaders
> only in my asp.net application and update back to the database by stored
> procedure. It seems so more easier...
"NH" <NH@.discussions.microsoft.com> wrote in message
news:E7E08185-7605-40E1-9EAF-E29AD493C528@.microsoft.com...
> If I am not concerned about database portability and the load on the
> database server is small then would it be good practice to use datareaders
> only in my asp.net application and update back to the database by stored
> procedure. It seems so more easier...
Yes, apart from in certain circumstances.
One of these is if you have a DataGrid, or GridView these days, bound to a
DataReader, you will not be able to do paging properly - you will ned to
bind it to a DataSet instead.
thanks for the replies, good point about the paging.
"Mark Rae" wrote:
> "NH" <NH@.discussions.microsoft.com> wrote in message
> news:E7E08185-7605-40E1-9EAF-E29AD493C528@.microsoft.com...
> > If I am not concerned about database portability and the load on the
> > database server is small then would it be good practice to use datareaders
> > only in my asp.net application and update back to the database by stored
> > procedure. It seems so more easier...
> Yes, apart from in certain circumstances.
> One of these is if you have a DataGrid, or GridView these days, bound to a
> DataReader, you will not be able to do paging properly - you will ned to
> bind it to a DataSet instead.
>
Except it's hard to believe that in a solid app you'd actually want to page
in the presentation layer. Paging should be done at the data layer because
(a) it increases reuse and (b) is far more efficient (not a
micro-optimization).
Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"NH" <NH@.discussions.microsoft.com> wrote in message
news:49220D06-5A94-40FD-8612-3FC75D4524C5@.microsoft.com...
> thanks for the replies, good point about the paging.
> "Mark Rae" wrote:
>> "NH" <NH@.discussions.microsoft.com> wrote in message
>> news:E7E08185-7605-40E1-9EAF-E29AD493C528@.microsoft.com...
>>
>> > If I am not concerned about database portability and the load on the
>> > database server is small then would it be good practice to use
>> > datareaders
>> > only in my asp.net application and update back to the database by
>> > stored
>> > procedure. It seems so more easier...
>>
>> Yes, apart from in certain circumstances.
>>
>> One of these is if you have a DataGrid, or GridView these days, bound to
>> a
>> DataReader, you will not be able to do paging properly - you will ned to
>> bind it to a DataSet instead.
>>
>>
>
0 comments:
Post a Comment