Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 15th, 2006, 06:24 PM
Registered User
Join Date: Sep 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Output from stored procedure


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

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;


Reply With Quote

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
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

All times are GMT -4. The time now is 01:25 PM.

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