question about DataSourceMode

D

Dan

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
 
E

Eliyahu Goldin

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
 
D

Dan

Thanks

Eliyahu Goldin said:
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top