Question on exporting data from a database using ASP.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brave

    Question on exporting data from a database using ASP.

    I don't know if this is possible, but I have been amazed at what I have
    learned from this group so I will throw it out there.

    I have an MS Access database that I connect to through .asp pages. Can
    I offer a user of my page the ability to export data from the Access
    database (either feeding of a table or a query) to their hardrive in an
    Excel format?

    If it is possible, I have two followup questions.

    1: Can you export in additional formats (Access, Word, Notepad, ...)?

    2: Can you do this if connecting to a SQL server?

    Thanks.

  • Bob Barrows [MVP]

    #2
    Re: Question on exporting data from a database using ASP.

    Brave wrote:
    I don't know if this is possible, but I have been amazed at what I
    have learned from this group so I will throw it out there.
    >
    I have an MS Access database that I connect to through .asp pages. Can
    I offer a user of my page the ability to export data from the Access
    database (either feeding of a table or a query) to their hardrive in
    an Excel format?
    >
    If it is possible, I have two followup questions.
    >
    1: Can you export in additional formats (Access, Word, Notepad, ...)?
    >
    2: Can you do this if connecting to a SQL server?
    >
    It is possible, but probably not in the fully automated way you are
    envisioning. ASP operates in an http environment, which means that it has no
    access to a user's hard drive. It will be up to the user to decide if and
    where they wish to save any file you send to them. To see what I'm talking
    about, put an excel file in one of your websites and browse to it. See the
    prompts? There is no way to eliminate those prompts.

    The other consideration is file size. You will probably want to limit the
    size of the file to be streamed to the client.

    The approach you will likely take is to set the Response.Conten tType to the
    appropriate mime setting, open a recordset and write its contents to
    Response. These articles can get you started:







    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Comment

    • Brave

      #3
      Re: Question on exporting data from a database using ASP.

      Thanks so much for taking the time.

      On Nov 8, 11:31 am, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
      wrote:
      Brave wrote:
      I don't know if this is possible, but I have been amazed at what I
      have learned from this group so I will throw it out there.
      >
      I have an MS Access database that I connect to through .asp pages. Can
      I offer a user of my page the ability to export data from the Access
      database (either feeding of a table or a query) to their hardrive in
      an Excel format?
      >
      If it is possible, I have two followup questions.
      >
      1: Can you export in additional formats (Access, Word, Notepad, ...)?
      >
      2: Can you do this if connecting to a SQL server?It is possible, but probably not in the fully automated way you are
      envisioning. ASP operates in an http environment, which means that it has no
      access to a user's hard drive. It will be up to the user to decide if and
      where they wish to save any file you send to them. To see what I'm talking
      about, put an excel file in one of your websites and browse to it. See the
      prompts? There is no way to eliminate those prompts.
      >
      The other consideration is file size. You will probably want to limit the
      size of the file to be streamed to the client.
      >
      The approach you will likely take is to set the Response.Conten tType to the
      appropriate mime setting, open a recordset and write its contents to
      Response. These articles can get you started:
      >

      >

      >
      --
      Microsoft MVP - ASP/ASP.NET
      Please reply to the newsgroup. This email account is my spam trap so I
      don't check it very often. If you must reply off-line, then remove the
      "NO SPAM"

      Comment

      Working...