...

View Full Version : Saving/Exporting Database Data To File



ldiuf
08-06-2002, 02:25 PM
Is it possible to save/export data via a webpage when using MS Access?

Senario...

Person comes to the site does a search/query on the db for whatever and when the results are shown the person wants to save/export the info to/as an excel file.

I know it is possible to view a clients drive while they are on your page and I think it's also possible to save various files to the drive as well, but how would it be saved as something?

If anyone knows of a tool or web pluggin or some code or anything that would be easy to set up for this kind of thing can you please let me know what the code is or where I can get the pluggins?

Thanks,
Larry:thumbsup:

allida77
08-06-2002, 03:02 PM
I have done this by looping through the recordset creating an csv file, then I allow a user to download the csv file. The csv file automatically opens in excel. If you want the code let me know.

ldiuf
08-07-2002, 12:40 AM
Yes would you please, anythig would be great, post it here or send me an e-mail it's in my member info but just incase it's

ldiuf@hotmail.com (it's a 1meg limit but hey it's free);)

Thanks Lots.
Cheers,
Larry:thumbsup:

geqy
08-07-2002, 10:04 AM
May I also have one copy?
geqy65@hotmail.com
Thanks

glenngv
08-07-2002, 10:52 AM
quick sample:

<%
response.contentType="application/csv"
response.write "field1,field2,field3"
%>

when this page is executed, the download prompt will be displayed, the user then will need to save it as .csv

ldiuf
08-07-2002, 11:19 PM
allida77,

Hey, it's asking for two files...
TFBContent.inc
taskdownload.asp

can you offer any help with this.

Larry

allida77
08-08-2002, 12:00 AM
dont worry about TFBContent that is just on of my includes that I forgot to take out, and the code:

Response.Redirect "taskdownload.asp?f=" & ExFile


should be

Response.Redirect "csvdownload.asp?f=" & ExFile

Sorry about that I changed the filenames that I sent to you and missed that in my code.

ldiuf
08-09-2002, 01:03 AM
Kewl, Thanks.

Larry

defeater
08-12-2002, 05:42 PM
May I also have one copy?
defeaterjp@hotmail.com
Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum