473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 4854
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
2
by: Oscar Thornell | last post by:
Hi, I have a general all purpose class that can take the name of a stored procedure and return a dataset... This general dataset that is returned I wish to cast to a strongly typed dataset of...
1
by: HardBap | last post by:
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe tool. I want to be able to access fields using ds.Customer.CompanyName. The problem is when I return this DataSet from a...
5
by: John | last post by:
Hi, I am developing a windows app using C# 2005. This app uses SQL Server or Oracle database depending on the what the user is using. Can I create one typed dataset and use it for SQL Server and...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
1
by: Chris | last post by:
I have started using strongly typed datasets as the basis of my data access layer. They work well but can be a bit fiddly when adding columns. I have a column which refuses to "change". It is an...
5
by: Chris | last post by:
I am trying to create a strongly typed dataset is VS 2005 with the VS creating the stored procedures. It won't create the stored procedures. The SQL script it generates is based on a SQL login so...
1
by: Code Monkey | last post by:
Silly question maybe, but I've been doing the following for far too long now: public static DataTable myDataTable() { string sql = @"SELECT column1, column2, column3, column4 FROM...
4
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.