Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 29th, 2005, 07:27 PM
Authorized User
 
Join Date: Oct 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Call a Stored Procedure

I have this stored procedure here and i want to call it so that i can insert data into SQL Sever tables.
Could someone gimme an example thru code.Here is my stored procedure:

create procedure sp_SaveNewSubCat(@SubCatName as varchar(50), @CatName as varchar(50))

as

declare @CatId as Integer
Set @CatId = (select catid from category where categoryname=@CatName)
Insert into subcategory(subcategoryname,catid) values(@SubCatName,@CatId)

--------------------------------------------

Thankyou

 
Old October 31st, 2005, 11:29 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Have you attempted doing any code yourself? What have you done so far, what errors have you gotten?

There are many ways to call a Stored Procedure from .NET. Check the help files.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Procedure call from CFMX Colonel Angus SQL Server 2000 0 September 20th, 2006 08:27 AM
Stored Procedure Call Syntax Bob Bedell VB.NET 2002/2003 Basics 1 March 26th, 2006 01:43 PM
How to call a Oracle Stored Procedure in VB6 krratnesh Pro VB Databases 1 February 19th, 2006 11:56 AM
To call oracle stored procedure in vb6 krratnesh Pro VB 6 0 February 1st, 2006 10:26 AM
Cobol Stored procedure call ParasJain01 Java Databases 0 February 1st, 2005 02:53 PM





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