Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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 15th, 2006, 06:24 PM
Registered User
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Output from stored procedure

Hello

I am trying to do the difficult task of writing the output from the SP below to an xml file. I can seem to get it to a well formed state(if i manually strip the autogenerated id), but now i need to actually write the output to an xml file. If someone knows how to get rid of the autogenerated id it would help, but just writing the xml file at the moment is urgent.

many thanks

Stored Procedure:

ALTER PROCEDURE SalaryBetweenDates
(
    @WeekStart datetime,
    @WeekEnd datetime
)

AS
SELECT s.StaffNo,s.StaffName,s.StaffAddress, s.HourlyRate,
sh.HoursWorked, sh.WeekStart, sh.WeekEnd,(sh.HoursWorked * s.HourlyRate)"Salary"

From Staff As S INNER JOIN StaffHours As Sh
On S.StaffNo = Sh.StaffNo

WHERE sh.WeekStart >= (@WeekStart)
AND WeekEnd <=(@WeekEnd)
FOR XML RAW ('paySlip'), root('Staff'), ELEMENTS XSINIL;


RETURN










Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass XML parameter to stored procedure BCullenward Classic ASP Databases 3 September 10th, 2008 02:07 PM
Get Stored Procedure Output using Access VBA LandLocked Access VBA 3 June 20th, 2007 11:20 AM
output parameter from MS SQL stored procedure nav1 VB How-To 0 March 14th, 2005 05:00 PM
Calling stored procedure with output parameters bansalh SQL Server 2000 2 November 10th, 2004 11:00 AM
XML in stored procedure dFoxGuru SQL Server 2000 1 October 4th, 2003 06:29 PM





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