Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Question on exporting data from a database using ASP.

Reply
Thread Tools

Question on exporting data from a database using ASP.

 
 
Brave
Guest
Posts: n/a
 
      11-08-2006
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.

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      11-08-2006
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.ContentType to the
appropriate mime setting, open a recordset and write its contents to
Response. These articles can get you started:

http://support.microsoft.com/kb/199841/
http://support.microsoft.com/kb/288130/

http://support.microsoft.com/kb/270906/
http://support.microsoft.com/kb/260239/

--
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"


 
Reply With Quote
 
 
 
 
Brave
Guest
Posts: n/a
 
      11-08-2006
Thanks so much for taking the time.

On Nov 8, 11:31 am, "Bob Barrows [MVP]" <reb01...@NOyahoo.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.ContentType to the
> appropriate mime setting, open a recordset and write its contents to
> Response. These articles can get you started:
>
> http://support.microsoft.com/kb/1998...com/kb/288130/
>
> http://support.microsoft.com/kb/2709...com/kb/260239/
>
> --
> 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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
exporting an excel file from database; making changes to excel file and updating the database by importing it back Luis Esteban Valencia ASP .Net 1 01-12-2005 12:28 AM
Exporting data from (All columns in data grid EXCEPT THE 1st) to E =?Utf-8?B?cG11ZA==?= ASP .Net 2 01-10-2005 07:53 PM
Exporting data to Microsoft Excel from a Web Form (using OWC) problem sarah5e@yahoo.com ASP .Net 1 05-10-2004 01:45 PM



Advertisments
 



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