Creating a downloadable text file on the fly

Results 1 to 2 of 2

Thread: Creating a downloadable text file on the fly

  1. #1
    Join Date
    Dec 1969

    Default Creating a downloadable text file on the fly

    I would like to give my users the ability to download the results of a query in the form of text file (tab delimited) instead of just displaying the records as a HTML table. Does anyone have any coding examples or suggestions on doing this?<BR><BR>Thanks.

  2. #2 Guest

    Default RE: Creating a downloadable text file on the fly

    First of all, you would provide the user to a link of the file that gets created as a result of the query. It would have to exist in a path that the user would have permissions to read (just like regular files).<BR><BR>Second, the file name would have to be unique to prevent the possibility of other users writing over the file with their query results. There are several ways to do this ... a GUID being the best ... or even just the Session ID. This also would create some security because of the difficulty of someone having to guess the name.<BR><BR>Third, you need to decide whether or not you&#039re in the business of keeping query results files permanently. Remember, your users could possibly just create a copy of your link to send to others who might want the results instead of clicking on the file to download it. If that is the case, you need to come up with some process for archiving results files. If you&#039re not keeping results, you might consider deleting the results file during the Session End event.<BR><BR>Fourth, you might want to do this process via an ActiveX control instead ... since an ActiveX control would have permission to write the results more interactively on the client side. The restriction being that only Win32 users could use the control. Netscape users would need a special plugin to use an ActiveX control.<BR><BR>I hope this sheds some light.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts