Click here to Skip to main content
13,351,465 members (45,624 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to export a gridview into an access database. I have the same header created in the database. Just wanted to know how to export gridview into that database. Any code sample would be highly appreciated. The header for the gridview and database is as follows:
Posted 25-Dec-12 1:02am
chester_it21 25-Dec-12 6:19am
I think, so far no such thing straight ... I mean, from a Gridview to an Access database ..
My solution "you must enter his data per row of the GridView to the database access .."

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You will not be able to generate Access database file on client side.
You have to dynamically create the access database file on server side, and serve it as downloadable content.

For how to serve dynamically generated file, have a look here:
Create and download a text file from a web page[^] and here:[^]

For how to generate an mdb file (catalog), look here:[^](it is, but really simple). The good news is, that you don't need to have access installed!

Be aware, that generating the file might take longer than the execution timeout!
09hadi 25-Dec-12 6:21am
Thank you, it worked perfectly
09hadi 25-Dec-12 6:55am
can u help me solve the timeout now?
Zoltán Zörgő 25-Dec-12 7:11am
First look here:
If the execution takes really long (above 30s) or there is a cnahce to have too high load on the server, you should make it asnyc: create a service, that takes a fifo (from a db table for example), where you put the mdb generation parameters. On request you just add a new job to the fifo, and notify the user, that the generation has begone. When finished, you put the result in an "inbox" like function on the site. On client side you can make scheduled ajax calls to the backend to check if there is anything in the inbox and notify the user.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180111.1 | Last Updated 25 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100