Hi There!

I'm looking into Strongly Typed DataSets in the .NET Framework. I know it
can generated strongly typed tables as objects and column names as
properties.

However, one thing that I would like to know is if it wraps database Stored
Procedures as methods and functions? For instance, if I have a Stored
Procedure called SelectBestProduct in the Product table, would I be able to
call the Stored Procedure with
Product.SelectBestProduct() statement and get DataReader or DataTable
returned?

Thank you all in advance!
Jon

Re: Can Strongly Typed DataSet contains Stored Procedure Wrappers? by gary

gary
Fri Nov 24 06:13:37 CST 2006

Hello,

Yes, basically, they will return a DataTable.

--
Gary
http://www.garyshort.org/

Jon B wrote:
> Hi There!
>
> I'm looking into Strongly Typed DataSets in the .NET Framework. I know it
> can generated strongly typed tables as objects and column names as
> properties.
>
> However, one thing that I would like to know is if it wraps database Stored
> Procedures as methods and functions? For instance, if I have a Stored
> Procedure called SelectBestProduct in the Product table, would I be able to
> call the Stored Procedure with
> Product.SelectBestProduct() statement and get DataReader or DataTable
> returned?
>
> Thank you all in advance!
> Jon


Re: Can Strongly Typed DataSet contains Stored Procedure Wrappers? by Miha

Miha
Fri Nov 24 07:12:34 CST 2006

Yes, you can but not with strong typed dataset - std doesn't interact with
database.
Perhaps with its strongly typed dataadapter or standalone one.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Jon B" <noemail@sorry.sorry> wrote in message
news:u132Fa7DHHA.3396@TK2MSFTNGP02.phx.gbl...
> Hi There!
>
> I'm looking into Strongly Typed DataSets in the .NET Framework. I know it
> can generated strongly typed tables as objects and column names as
> properties.
>
> However, one thing that I would like to know is if it wraps database
> Stored Procedures as methods and functions? For instance, if I have a
> Stored Procedure called SelectBestProduct in the Product table, would I be
> able to call the Stored Procedure with
> Product.SelectBestProduct() statement and get DataReader or DataTable
> returned?
>
> Thank you all in advance!
> Jon
>


Re: Can Strongly Typed DataSet contains Stored Procedure Wrappers? by Dave

Dave
Sun Nov 26 03:40:13 CST 2006

Hi Jon,

In the 2.0 framework that can be done using TableAdapters. TableAdapters
can be configured in the DataSet designer.

"TableAdapters"
http://msdn2.microsoft.com/en-us/library/7zt3ycf2(VS.80).aspx

And since the DataSet, along with each Typed DataTable and DataRow are all
partial classes, you can extend them in code without having to worry about
the DataSet designer replacing it at a later time, as in previous versions
of Visual Studio .NET. e.g., you could add a "FullName" property to a
DataRow that contains information about a person. The property could return
the concatenation of two columns such as FirstName and LastName, or even
execute a stored procedure in the database and cache the result.

--
Dave Sexton

"Jon B" <noemail@sorry.sorry> wrote in message
news:u132Fa7DHHA.3396@TK2MSFTNGP02.phx.gbl...
> Hi There!
>
> I'm looking into Strongly Typed DataSets in the .NET Framework. I know it
> can generated strongly typed tables as objects and column names as
> properties.
>
> However, one thing that I would like to know is if it wraps database
> Stored Procedures as methods and functions? For instance, if I have a
> Stored Procedure called SelectBestProduct in the Product table, would I be
> able to call the Stored Procedure with
> Product.SelectBestProduct() statement and get DataReader or DataTable
> returned?
>
> Thank you all in advance!
> Jon
>