Home All Groups Group Topic Archive Search About
Author
21 Jun 2005 11:24 AM
Niño
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

Author
21 Jun 2005 12:14 PM
Shai Goldberg
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


Show quoteHide quote
"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
Are all your drivers up to date? click for free checkup

Author
21 Jun 2005 12:41 PM
Chad Z. Hower aka Kudzu
"=?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
Author
22 Jun 2005 12:47 AM
Niño
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

--
rad


Show quoteHide quote
"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
>
Author
22 Jun 2005 12:49 AM
Niño
thanks. your right...i can use the fill of a dataadapter to directly fill a
datatable. do you think its ok to use view?

--
rad


Show quoteHide quote
"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

Bookmark and Share