Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2008 > SQL Server 2008
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2008 General discussion of SQL Server *2008* version only - not related to a specific book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2008 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 14th, 2010, 01:11 AM
Friend of Wrox
Points: 660, Level: 9
Points: 660, Level: 9 Points: 660, Level: 9 Points: 660, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: St. Louis, , .
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Default Microsoft SQL Server Management Studio (2008) Question

I am new to writing stored procedures and this will be my first stored procedure written with Microsoft SQL Server Management Studio. I am familiar with working with VS 2010 and I have noticed that the IDE is very different. So, let's start with the basics. How do I go about adding a new stored procedure into the group of stores procedures that the project currently has. I already know that name and the T-SQL code I need. I just need to put it.

Last edited by Bill_Thompson; October 14th, 2010 at 01:14 AM..
Reply With Quote
  #2 (permalink)  
Old October 14th, 2010, 01:31 AM
Authorized User
 
Join Date: Jun 2008
Location: Faridabad, Haryana, India.
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Default

if you are using SqlCommand object then you use:
cmd.commandType = CommandType.StoreProcedure;

this is to call a store procedure
__________________

Reply With Quote
  #3 (permalink)  
Old October 14th, 2010, 02:00 AM
Friend of Wrox
Points: 660, Level: 9
Points: 660, Level: 9 Points: 660, Level: 9 Points: 660, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: St. Louis, , .
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Jitender View Post
if you are using SqlCommand object then you use:
cmd.commandType = CommandType.StoreProcedure;

this is to call a store procedure
How do I save it? I mean the stored procedure, not the C# code. In the Object Explorer of the SQL Manager there is already a list of stored procedures and I want my stored procedure in that list.

You see, I am accessing this stored procedure through a C# WPF user interface
Reply With Quote
  #4 (permalink)  
Old October 14th, 2010, 03:56 AM
Registered User
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

CREATE PROC <Stored Procedure name>
AS
<your query>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft SQL Server Management Studio Project p177 fh84 BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 1 July 6th, 2010 07:15 AM
Help With Visual Studio 2008 & SQL Server 2005 Express Rambo Visual Studio 2008 3 December 21st, 2009 12:08 PM
Visual studio 2005(32 bit) code not work in visual studio 2008 on windows server 2008 gr8.jain Visual Basic 2008 Essentials 1 August 31st, 2009 10:07 AM
SQL Server Management Studio Error! everest SQL Server 2005 0 August 14th, 2008 12:13 PM
Chp10, 11 sql server express management studio bruhnf BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 March 13th, 2006 05:00 PM



All times are GMT -4. The time now is 10:29 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.