11
Reply

DataSet,DataReader and Caching !!

abas shahen

abas shahen

Oct 2 2009 8:05 AM
10k
hi all how are u?? in fact i have read more about These subjects but i still Confused with These Problems: 1-some one Said you should Use DataReader when You Get Large Data and Dont caching this Because it will consume resources, Others Said Use DataSet in this Way. 2- Some One said Use DataReader only if u want to read Data not to Update Delete....etc. 3-other say You Should Dataset and DataTable in order to reduce Opening connetction to Data Base when you want to delete update and insert) (note : i didnt update DataBase within Dataset , im using ExcuteNonQuery(); command for update and Delete within stored procedure. i dont think i can reduce openning connection to DataBase By using Dataset and DataTable(in case of Update and Delete and Insert) its has the same effect of using DataReader to Read data and then Upodate or delete data with ExcuteNonQuery(); command with the help of Stored Procedure. my questions as follow: 1- if i want to Get Some Cloumn from Data base and Load it in any Disconected Data what i should Use( note not all cloumn only some Cloumn) in case i didnt use DataRelations but in case Using Stored Procedure and Data Base Relation rather Than ado.net DataRelations. 2- i want to Cache over than 10,000 row( its Mobile Numbers) and if one Buy this it will be removed, in this Case caching is good choice?? such as Removing Reserved Numbers From chached not reserved Mobile Numbers. 3- cahing mean available to all Users of application? 4- disconected Data availabe to the user after page Postback? if the answer Yes , what if part of Data updated? the disconneted data updated?(in case not cached)

Answers (11)