view vs sproc

G

Guest

i have a query containing inner joins....i use it to populate my truegrid.
which better way of executing my query? make a view of it or make a stored
procedure of it?
im using a dataset and dataadapter to populate a datatable to be bind as the
datasource of my truegrid.
can you suggest a better(optimize) way of doin it?
 
G

Guest

Hi,
If you have a Select which is not using parameters then this is what Views
are ment for. Sprocs are for wen you need paramaters although you can use
them also as a select statements.
Another thing is that you don't have to use a DataSet in order to populate a
DataTable, you can use the Fill of a DataAdapter to directly fill a DataTable
with no use of DataSet.
 
C

Chad Z. Hower aka Kudzu

"=?Utf-8?B?U2hhaSBHb2xkYmVyZw==?="
If you have a Select which is not using parameters then this is what
Views are ment for. Sprocs are for wen you need paramaters although
you can use them also as a select statements.

Views can have paramters applied via where and other predicates. Users of SQL server often dont
understand the roles in a generic mannber because of SQL Server's preference for stored
procedures. In many other databases views are a better choice over using stored procedures for
selects.
 
G

Guest

thanks!!! me too...i prefer views in selects. but my problem is. im in a team
developing a business system. as one standard that they has set,..we are not
allowed to use views. i contest. and when i was required to finish some
modules in a given time,..using views instead of sprocs,..saved me some more
time. and i want to defend using views to them. can u site or explain some
technical aspects about views vs sprocs? why did microsoft made the views if
it aint practical to use it. something like that. i appreciate your help so
much. thanks
 
G

Guest

thanks. your right...i can use the fill of a dataadapter to directly fill a
datatable. do you think its ok to use view?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top