Your question could be read in four ways --
"populating a subset of table data to a datagrid or form of controls - a
dataview or a stored procedure?"
or
"populating a subset of datatable data to a datagrid or form of controls - a
view or a stored procedure?"
or
"populating a subset of datatable data to a datagrid or form of controls - a
dataview or a stored procedure?"
or
"populating a subset of table data to a datagrid or form of controls - a
view or a stored procedure?"
The
answer to #1 is -- stored proc, because, no use introducing an extra object
(dataview), when a dataset can be bound directly.
answer to #2 is -- stored proc, because even though view's query plan is
cached, stored procedures offer other advantages like table structure
abstraction and security.
answer to #3 is -- dataview, because it would avoid an extra roundtrip/hit
to the database.
answer to #4 is -- stored proc, because of same reasons as #2.
Thought I might mention that my answers are like on size fits all, and the
golden rule with database related anything is, there is no "/makeworkbetter"
switch. It's a black art that needs knowledge and experience.
- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik