Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
What is the difference between a data view and a dataset?
Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
Posted
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).
Gamer extraordinaire. Programmer wannabe.
Posted

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?

Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
  • *Experts*
Posted

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

"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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...