|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
view vs sproci 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? -- rad 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. -- Show quoteHide quote**if you found the answer helpful Please press the Yes buttom.** Shai "Niño" wrote: > 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? > > > -- > rad "=?Utf-8?B?U2hhaSBHb2xkYmVyZw==?="
<ShaiGoldb***@discussions.microsoft.com> wrote in news:A108E434-0812-4F48-ACE8-29CDEE4A717D@microsoft.com: Views can have paramters applied via where and other predicates. Users of SQL server often dont > 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. 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. -- Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/ "Programming is an art form that fights back" Blog: http://blogs.atozed.com/kudzu 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 -- Show quoteHide quoterad "Chad Z. Hower aka Kudzu" wrote: > "=?Utf-8?B?U2hhaSBHb2xkYmVyZw==?=" > <ShaiGoldb***@discussions.microsoft.com> wrote in > news:A108E434-0812-4F48-ACE8-29CDEE4A717D@microsoft.com: > > 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. > > > -- > Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/ > "Programming is an art form that fights back" > > Blog: http://blogs.atozed.com/kudzu > thanks. your right...i can use the fill of a dataadapter to directly fill a
datatable. do you think its ok to use view? -- Show quoteHide quoterad "Shai Goldberg" wrote: > 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. > > -- > **if you found the answer helpful Please press the Yes buttom.** > > Shai > > > "Niño" wrote: > > > 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? > > > > > > -- > > rad
Other interesting topics
Operator '=' on System.DateTime and System.Double
sqltransaction Trying to find ClientID of web form - Update System.InvalidOperationException: ExecuteReader from mm/dd/yyyy to yyyy/mm/dd CancelCurrentEdit doesn't OleDb: Get Properties Displaying many-to-many relation data in dataGrids Trying to find ClientID of web form DataColumn.Expression complex calculations |
|||||||||||||||||||||||