471,594 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

Can Strongly Typed DataSet contains Stored Procedure Wrappers?

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
Nov 24 '06 #1
3 4772
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
Nov 24 '06 #2
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" <no*****@sorry.sorrywrote in message
news:u1**************@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
Nov 24 '06 #3
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/lib...f2(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" <no*****@sorry.sorrywrote in message
news:u1**************@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

Nov 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Oscar Thornell | last post: by
5 posts views Thread by John | last post: by
21 posts views Thread by Peter Bradley | last post: by
1 post views Thread by Chris | last post: by
5 posts views Thread by Chris | last post: by
1 post views Thread by Code Monkey | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.