SQL Query to CSV or XLS file
- From: "John" <jwheasi@xxxxxxxxxxx>
- Date: Fri, 16 Feb 2007 22:55:11 -0600
Hello,
I'm completely ignorant of VB scripting, and ASP. Unfortunately my
employeer has decided I should modify an ASP webpage we have that is written
using VBScript. I do have some programming experience in other languages.
I have googled the archives and the 'net to find the code snippets I need,
but haven't had a whole lot of luck.
I will explain what the page is doing first.
The page first presents a form that presents 2 calanders that are used to
specify a start and end date. The user then clicks a button.
The page then reloads. It executes an SQL query and then displays the
results of the query in a table.
I would like for the user to have a button on the form where the query
results are displayed that allows the user to download the query results as
a CSV table.
I was thinking the best way to do it would be to resubmit the page and
re-execute the SQL query. Instead of writing the query results to the form
though, it would output it to the CSV file. I like the resubmit because I
then have all the code I need in the one asp file that I am storing on the
server.
Esssentially
1. How do I present the 'Save file Dialog Box' to the user?
2. How do I then write the query data to the csv file that has the name the
user specified?
I have found lots of ways to write the file on the server, then present the
user with a link to the file on the server. I would rather let the user
specify the name and never store a file on the server. That way I don't
have to worry about these files building up.
I may have found solutions that do exactly what I'm looking for, but their
behaviour isn't described well enough for me to know what it will do when I
try to execute it.
After looking at the code I understand what it is doing, and how the code
tells it to do what it does. I just don't have the knowledge to know what
commands I need to use to add functionality to it.
Thanks in advance for the help.
John
.
- Follow-Ups:
- Re: SQL Query to CSV or XLS file
- From: Anthony Jones
- Re: SQL Query to CSV or XLS file
- Prev by Date: Re: Convert Javascript to VBScript?
- Next by Date: Re: [win98] Reset Daylight Savings Start/Stop...
- Previous by thread: Writing registry values to the registry ? Help Req
- Next by thread: Re: SQL Query to CSV or XLS file
- Index(es):