Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2008 > SQL Server 2008
|
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 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 October 14th, 2010, 01:11 AM
Friend of Wrox
 
Join Date: Jun 2005
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..
 
Old October 14th, 2010, 01:31 AM
Authorized User
 
Join Date: Jun 2008
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
__________________

 
Old October 14th, 2010, 02:00 AM
Friend of Wrox
 
Join Date: Jun 2005
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
 
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>





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





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