data binding
For databinding which is most suitable for just display records to a page,connected mode or disconnected mode?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Feb 26, 2010, 3:04 AM
Posted Feb 26, 2010, 3:03 AM
kiran kumarPosted Feb 26, 2010, 1:40 AM
http://forums.asp.net/t/1366206.aspx
mark the answer if it helps you
Dushan StankovicPosted Feb 26, 2010, 12:41 AM
If you use ADO.NET, I think that is better to use disconnected mode. Why is that?
If you use DataReader, for connected mode, you must open connection read all rows and columns to some collection, close DataReader and connection and bind that data, through control like BindingSource or not, with your control. If you forget to close DataReader your data source will be unusable for other app until Disposing connection.
If you use disconnected mode you have to fill i.e. DataTable from TableAdapter and TA will menage your connection state, for a short time conn will be available. You can create all controls From designer to display that data, and if you use typed DataSet you don't need to type any line of code. I must to note that Fill method of TableAdapter use internal DataReader class for return data.
One thing is important, if you need fast, programmicly menaged data retreat, DataReader and connected mode is better.
If you use LINQ, clr will have concern about connection mode.
Lalit MPosted Feb 26, 2010, 12:29 AM
http://davidhayden.com/blog/dave/archive/2006/02/11/2798.aspx
Amit ChoudharyPosted Feb 26, 2010, 12:13 AM
Well i suggest you disconnected mode Using Ado.Net classes because it make your server connection available to other resources also.