Retrieving info from database

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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...
    > 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
    >
    >

    Frogbčrt Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139