Ask a Question related to ASP Database, Design and Development.
-
Geoff Wickens #1
Retrieving info from database
Thanks to a lot of excellent advice from this newsgroup I have managed to
get a site working which is database driven. I would now like to know if it
is possible to get information out of the database in a form such as an
Excel spreadsheet or similar. What I would like users to be able to do is to
download data in a form which they can then use to mailmerge eg as address
labels. Is this possible, and what is the best approach?
Geoff Wickens
Geoff Wickens Guest
-
MySQL Database not retrieving the full database
Hi, I am using MySQL and PHP for my repository. It has 500+ records. till now it was displayiing all records in the database, but since from one... -
Retrieving images to flash from SQL database
I've been reading about how, with flash, read and write from SQL server database. But I only finded articles about read and write text data. I need... -
Storing and Retrieving Info in Access
I'm not sure if this is even the best place to ask this question, but here goes: my site is hosted by a third party on a Win2K platform and there... -
Passing database info to page allow user input then pass into another database
Hi I really am going crazy! I'm using VBScript, ASP, and SQL My page reminds me of a shopping cart but looking at shopping cart examples has not... -
Database record retrieving
> They have links to actually, they do, but they just use a more complex layout, among other things. for instance, the center column would be... -
Frogbčrt #2
Re: Retrieving info from database
Hi Geoff,
although it is *possible* to create an Excel spreadsheet (using Office
objects) on the server and returning it to the user, it is not recommended
(Microsoft does not support running applications/scripts that interface with
Office on a web server). Your best bet (and the easiest thing to achieve)
would be to use the FileSystem object on the server to create a
comma-separated file and return that to the user. Excel is perfectly happy
with CSV files, as are Word (as a source for mail merge or address labels)
and Access (as a source for a linked/external table). Typically, you would:
- request the data from the database into a recordset
- open a file for output using the FileSystem object (perhaps with a random
filename)
- iterate through the recordset, converting the fields to a comma-separated
string
- write the string to the file
- return a link to the file to the user for downloading
You should consider some sort of cleanup routine to get rid of the files
created from time to time. Again, the FileSystem object can help you there.
Create a script that cleans up the files and schedule it to run at a regular
interval (e.g. weekly).
HTH,
Robert
"Geoff Wickens" <gwickens@hotmail.com> wrote in message
news:6YY3b.189$Ic6.36833@newsfep2-gui.server.ntli.net...it> Thanks to a lot of excellent advice from this newsgroup I have managed to
> get a site working which is database driven. I would now like to know ifto> is possible to get information out of the database in a form such as an
> Excel spreadsheet or similar. What I would like users to be able to do is> download data in a form which they can then use to mailmerge eg as address
> labels. Is this possible, and what is the best approach?
>
> Geoff Wickens
>
>
Frogbčrt Guest



Reply With Quote

