473,545 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 SelectBestProdu ct in the Product table, would I be able to
call the Stored Procedure with
Product.SelectB estProduct() statement and get DataReader or DataTable
returned?

Thank you all in advance!
Jon
Nov 24 '06 #1
3 4862
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 SelectBestProdu ct in the Product table, would I be able to
call the Stored Procedure with
Product.SelectB estProduct() 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******** ******@TK2MSFTN GP02.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 SelectBestProdu ct in the Product table, would I be
able to call the Stored Procedure with
Product.SelectB estProduct() 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.

"TableAdapt ers"
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******** ******@TK2MSFTN GP02.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 SelectBestProdu ct in the Product table, would I be
able to call the Stored Procedure with
Product.SelectB estProduct() 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
2855
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 when I try to instantiate one of the strongly-typed tables from this dataset from a different assembly, I cannot. Let me provide examples... If...
2
4254
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 my choosing. I have the XML Schema and a generated specialization of the DataSet that I wan´t to cast to...
1
2172
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 Web Service it adds another Table to the DataSet that contains the data. I have to access the data using ds.Tables.Rows.ToString(). This defeats the...
5
3115
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 Oracle? Probably not. How can I structure my data access layer so the app will be switching easily between those two databases with a locally...
21
2395
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 with the ability to configure the connection string via a config file? The designer seems to hard-code the connection string into the dataset...
1
1250
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 integer which when I change its value in the datatable it changes from 1 to 2 (I can see it in the debugger). When I call the update method it resets...
5
1091
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 the script looks something like: DROP PROCEDURE WebManagerV2.WEB_PAGE_UPDATE these scripts won't work until I change the script to: DROP...
1
3543
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 myTable"; using (SqlConnection conn = new SqlConnection(websqlconn)) { SqlCommand cmd = new SqlCommand(sql, conn);
4
3095
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 comparisions) cleared? Thanks, Rachana
0
7398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
701
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.