Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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 July 15th, 2004, 09:14 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default passing stored procedure

Hi, I want to pass store procedure employeeID, the output in the asp page should be Employeefull Name, orderNumber, customerName, orderdate,unitprice

 
Old July 15th, 2004, 09:20 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi There,

Create procedure in your SQL server as follows.
Code:
Create procedure Procedure_Name(@EmpId Int)
as
Select Emp_Name, ThisColumn, ThatColumn, AnyColumn from AnyTable where EmpId = @EmpId
return
In your ASP page
Code:
'Your connection object code
'Your Recordset object Code
RecordSetObj.Open "Execute Procedure_Name @EmpId = 100"
If not RecordSetObj.EOF then
Response.write RecordSetObj("EmpName")
Response.write RecordSetObj("ThisColumn")...
Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Paramter-Stored Procedure ms1234 Crystal Reports 2 May 22nd, 2007 11:34 AM
Passing an "IN" clause to a stored procedure atcs2152 SQL Server 2000 5 February 7th, 2006 10:55 PM
Passing parameters to a sql stored procedure digby_dog VB.NET 2002/2003 Basics 0 July 11th, 2005 08:35 AM
Passing datasource to a stored procedure ctranjith SQL Server 2000 2 October 7th, 2004 01:49 PM
Passing a parameter value to Stored Procedure mcinar SQL Server 2000 9 October 3rd, 2004 09:42 PM





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