Home All Groups Group Topic Archive Search About


Author
1 May 2006 8:50 PM
Kevin Audleman
I am storing user entered form data from an ASP page in a MSSQL 2000
database. I would like to give my administrators a way to download a
tab file with the entries. Is writing an ASP page the best way to do
this? And if so, how can I convert database records into a file that
will download through the browser?

Thanks,
Kevin

Author
1 May 2006 9:04 PM
Evertjan.
Kevin Audleman wrote on 01 mei 2006 in
microsoft.public.inetserver.asp.general:

> I am storing user entered form data from an ASP page in a MSSQL 2000
> database. I would like to give my administrators a way to download a
> tab file with the entries. Is writing an ASP page the best way to do
> this?

It is a very good way. Discussion of "the Best" is not usefull, methinks.

> And if so, how can I convert database records into a file that
> will download through the browser?

Just response.write the text in an asp-file without the html elements.

When using VBscript [Jscript is also possible], use:

vbTab
vbCrLf

and loop through the records, adding the required fields.

It can be downloaded by the browser as window content.
If you mean downloading to a file, rightclick+"save as ..." the link.

You could set the filetype:

<%
Response.AddHeader "Content-Type", "application/x-unknown"
%>

forcing a download to file.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

AddThis Social Bookmark Button