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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit ChoudharyRank #145 · 15.8K reputationPosted Feb 25, 2010, 7:13 PM EST
Well i suggest you disconnected mode Using Ado.Net classes because it make your server connection available to other resources also.
Lalit MRank #1,186 · 1.5K reputationPosted Feb 25, 2010, 7:29 PM EST
http://davidhayden.com/blog/dave/archive/2006/02/11/2798.aspx
Dushan Stankovic72 reputationPosted Feb 25, 2010, 7:41 PM EST
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.
kiran kumarRank #3,110 · 461 reputationPosted Feb 25, 2010, 8:40 PM EST
http://forums.asp.net/t/1366206.aspx
mark the answer if it helps you
Posted Feb 25, 2010, 10:03 PM EST
Posted Feb 25, 2010, 10:04 PM EST