Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2005, 12:27 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default Return DataSet / DataTable from Stored Procedure

How i can return a DataSet or DataTable from a Stored Procedure

 
Old March 19th, 2005, 03:20 PM
Authorized User
 
Join Date: Mar 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes you can fill the Data Adapter from command
as cmd.ExceuteReader()

then from this you can pull data to dataset from dataadapter

as

da.fill(ds,"somename")

Atul Kumar Sharma
Database Analyst

 
Old March 19th, 2005, 10:00 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

actually i want to return a dataset from stored procedure, not through data adapter

 
Old March 20th, 2005, 05:39 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can't. A DataSet is a .NET thing, and Sql server is not aware of that concept. All it can return is data, a result set, which can be put in a DataSet through a DataAdapter.

Take a look at the Enterprise Library and the Data Access Application Block in particular. The EntLib allows you to easily retrieve data from Sql server and other data sources without you bothering with DataAdapters, connections etc.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
[Resolved] Get return value from stored procedure snufse ASP.NET 2.0 Basics 1 August 8th, 2008 11:05 AM
Stored Procedure return value dmiles C# 3 December 6th, 2007 05:20 AM
how can i return a recrdset in a stored procedure? arathy ASP.NET 1.0 and 1.1 Basics 0 December 12th, 2006 04:24 AM
Can i return a recordset in a Stored procedure chiefouko VB Databases Basics 6 December 12th, 2006 03:34 AM
Can i return a recordset in a Stored procedure chiefouko SQL Server 2000 1 June 23rd, 2003 06:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.