Go Back   AnandTech Forums > Software > Software for Windows

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2013
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 12-19-2005, 01:53 PM   #1
Gunslinger08
Lifer
 
Gunslinger08's Avatar
 
Join Date: Nov 2001
Posts: 13,025
Default How to return a DataSet from a SQL Server Stored Procedure in C#.Net

I need to pass a parameter to the stored procedure as well.
Gunslinger08 is offline   Reply With Quote
Old 12-19-2005, 02:01 PM   #2
Stuxnet
Banned
 
Join Date: Jun 2005
Posts: 8,405
Default How to return a DataSet from a SQL Server Stored Procedure in C#.Net

Download the application block "SqlHelper" and use "ExecuteDataSet(...)".
Stuxnet is offline   Reply With Quote
Old 12-19-2005, 02:02 PM   #3
Spydermag68
Platinum Member
 
Spydermag68's Avatar
 
Join Date: Apr 2002
Posts: 2,005
Default How to return a DataSet from a SQL Server Stored Procedure in C#.Net

Chapter 19 from this website has the code.

Pro C# 2005
__________________
My Rig
AMD 965 Phenom II Gigabyte GA-MA790FXT-UD5P Corsair XMS3 RADEON 5850 Logitech MX 610 - Left handed version!

====
(\__/)
(='.'=) I have no idea what you are talking about
(")_(") so here is a bunny with a pancake on it's head.
Spydermag68 is online now   Reply With Quote
Old 12-19-2005, 02:19 PM   #4
DaShen
Lifer
 
Join Date: Dec 2000
Posts: 10,712
Default How to return a DataSet from a SQL Server Stored Procedure in C#.Net

Establish a (SQL, ADO, OLEDB) connection, Set a (SQL, ADO, OLEDB) Command using the stored procedure, Set & Instantiate a DataAdapter, Use the Command to set the Data Adapter, Fill the DataSet using the DataAdapter and whatever table or field you want, Use the DataSet in C#.

I think that is it. You may want to look it up though.
DaShen is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:52 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.