Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   question about DataSourceMode (http://www.velocityreviews.com/forums/t763137-question-about-datasourcemode.html)

Dan 02-08-2007 09:40 AM

question about DataSourceMode
 
Hi,

i defined a datalist and a datasource like this:

<asp:DataList ID="DataList1" runat="server">
......
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:cat %>"
SelectCommand="select * from dbtable"
</asp:SqlDataSource>

Now i discovered the property DataSourceMode in the tag <sqldatasource> with
two options: datareader and dataset.
My question is: i tried both without seeing any difference. So what's the
purpose of this, and what is then used by default?

Thanks
Dan



Eliyahu Goldin 02-08-2007 10:31 AM

Re: question about DataSourceMode
 
The modes differ by the controls used for data access. Use datareader mode
if you need read-only recordser with no paging or sorting. It is much
lighter than the dataset mode. The default is dataset.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Dan" <d@d.d> wrote in message
news:%23jSkSi2SHHA.4188@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> i defined a datalist and a datasource like this:
>
> <asp:DataList ID="DataList1" runat="server">
> .....
> </asp:DataList>
> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
> ConnectionString="<%$ ConnectionStrings:cat %>"
> SelectCommand="select * from dbtable"
> </asp:SqlDataSource>
>
> Now i discovered the property DataSourceMode in the tag <sqldatasource>
> with two options: datareader and dataset.
> My question is: i tried both without seeing any difference. So what's the
> purpose of this, and what is then used by default?
>
> Thanks
> Dan
>




Dan 02-08-2007 05:19 PM

Re: question about DataSourceMode
 
Thanks

"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@mMvVpPsS.org> schreef in
bericht news:%235Ozix2SHHA.1016@TK2MSFTNGP04.phx.gbl...
> The modes differ by the controls used for data access. Use datareader mode
> if you need read-only recordser with no paging or sorting. It is much
> lighter than the dataset mode. The default is dataset.
>
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "Dan" <d@d.d> wrote in message
> news:%23jSkSi2SHHA.4188@TK2MSFTNGP06.phx.gbl...
>> Hi,
>>
>> i defined a datalist and a datasource like this:
>>
>> <asp:DataList ID="DataList1" runat="server">
>> .....
>> </asp:DataList>
>> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
>> ConnectionString="<%$ ConnectionStrings:cat %>"
>> SelectCommand="select * from dbtable"
>> </asp:SqlDataSource>
>>
>> Now i discovered the property DataSourceMode in the tag <sqldatasource>
>> with two options: datareader and dataset.
>> My question is: i tried both without seeing any difference. So what's the
>> purpose of this, and what is then used by default?
>>
>> Thanks
>> Dan
>>

>
>





All times are GMT. The time now is 03:20 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.