fkheng Posted May 22, 2003 Posted May 22, 2003 What is the difference between a data view and a dataset? Quote Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
wyrd Posted May 22, 2003 Posted May 22, 2003 DataSet holds DataTables (like a database), DataView is a view for a DataTable which can control how the underlying DataTable can be viewed by restricting columns, etc. In a database views are usually used to both increase performance and also restrict access to certain columns, while in .NET via code they can be used to restrict access to certain columns as well, but also gives more flexibility on how you can present data (as far as I know they don't give any performance increase via code). Quote Gamer extraordinaire. Programmer wannabe.
fkheng Posted May 22, 2003 Author Posted May 22, 2003 i see so basically, data view is just to define the settings for how data is to be viewed? whereas data set actually holds the data which can be manipulated? Quote Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
*Experts* Nerseus Posted May 22, 2003 *Experts* Posted May 22, 2003 A DataView is nothing by itself - it does not contain ANY data. It MUST be hooked to a DataTable to have any data. You can think of a DataView as an array of pointers into a DataTable. The array can be filtered and sorted as well (the primary use for a DataView). You can also set some properties such as AllowNew, AllowDelete, etc. This is how you control whether new rows can be added or deleted from a DataTable when binding to a DataGrid. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
wyrd Posted May 22, 2003 Posted May 22, 2003 DataSet -> DataTable -> DataRow -> DataColumn -> Data. Quote Gamer extraordinaire. Programmer wannabe.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.