473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

create XML file with ASP

I have a stored procedure that creates XML content the way I want it using
FOR XML AUTO, ELEMENTS. At least when I run the query anyway. What I want is
to use that SP in an ASP page. When opened, I want a dialog box to pop up
with the option to open or save as... to the client's HDD. Here's my header
for the page. The recordset is below that. When I open the page, I get the
Save As.. I want, but no records are saved.

What I'm missing is how to deal with XML and the recordset thereof. It's
more of a feed that a recordset. How do I get that feed into a file on the
client machine?

<% Response.contenttype = "application/vnd.xml" %>
<% Response.AddHeader "Content-Disposition", "filename=Product.xml" %>

thanks
Sep 1 '07 #1
2 4083
Gazing into my crystal ball I observed "shank" <sh***@tampabay.rr.com>
writing in news:eq**************@TK2MSFTNGP04.phx.gbl:
I have a stored procedure that creates XML content the way I want it
using FOR XML AUTO, ELEMENTS. At least when I run the query anyway.
What I want is to use that SP in an ASP page. When opened, I want a
dialog box to pop up with the option to open or save as... to the
client's HDD. Here's my header for the page. The recordset is below
that. When I open the page, I get the Save As.. I want, but no records
are saved.

What I'm missing is how to deal with XML and the recordset thereof.
It's more of a feed that a recordset. How do I get that feed into a
file on the client machine?

<% Response.contenttype = "application/vnd.xml" %>
<% Response.AddHeader "Content-Disposition", "filename=Product.xml" %>

thanks
You are probably using the wrong headers. You should be sending content
type text/xml .

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Sep 2 '07 #2

"Adrienne Boswell" <ar****@yahoo.comwrote in message
news:Xn****************************@69.28.186.121. ..
Gazing into my crystal ball I observed "shank" <sh***@tampabay.rr.com>
writing in news:eq**************@TK2MSFTNGP04.phx.gbl:
>I have a stored procedure that creates XML content the way I want it
using FOR XML AUTO, ELEMENTS. At least when I run the query anyway.
What I want is to use that SP in an ASP page. When opened, I want a
dialog box to pop up with the option to open or save as... to the
client's HDD. Here's my header for the page. The recordset is below
that. When I open the page, I get the Save As.. I want, but no records
are saved.

What I'm missing is how to deal with XML and the recordset thereof.
It's more of a feed that a recordset. How do I get that feed into a
file on the client machine?

<% Response.contenttype = "application/vnd.xml" %>
<% Response.AddHeader "Content-Disposition", "filename=Product.xml" %>

thanks

You are probably using the wrong headers. You should be sending content
type text/xml .

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
======================
thanks! Good point - But that didn't help.
Sep 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Frank Millman | last post by:
Hi all I need to generate potentially large reports from a database, and I want to offer the option of print preview before actually printing (using wxPython). I figure that the best way to...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
3
by: brook | last post by:
hey all - i´m new to php and having trouble writing a simple code which should create a file. here is the most simplified version: <?php $content = "my content"; $path = "test.txt";...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.