通过ASP.net C#将Gridview导出到Access数据库(.mdb) [英] Export Gridview to Access Database(.mdb) via ASP.net C#

查看:90
本文介绍了通过ASP.net C#将Gridview导出到Access数据库(.mdb)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想将gridview导出到访问数据库中。我在数据库中创建了相同的标头。只是想知道如何将gridview导出到该数据库中。任何代码示例都将受到高度赞赏。 gridview和数据库的标题如下:

SID,Degree,Semester,Course,Marks,Discipline

解决方案

你不会能够在客户端生成Access数据库文件。

您必须在服务器端动态创建访问数据库文件,并将其作为可下载内容提供。



关于如何提供动态生成的文件,请看这里:

从网页创建和下载文本文件 [ ^ ]在这里: http://chrisfulstow.com/sending-dynamically-generated-files-to-浏览器在asp-net [ ^ ]



关于如何生成mdb文件(目录),请看这里:http://support.microsoft.com/?id=317867 [ ^ ](它是vb.net,b真的很简单)。好消息是,您不需要安装访问权限!



请注意,生成文件可能需要比执行超时更长的时间!

Hi,
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:
SID,Degree,Semester,Course,Marks,Discipline

解决方案

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: http://chrisfulstow.com/sending-dynamically-generated-files-to-the-browser-in-asp-net[^]

For how to generate an mdb file (catalog), look here: http://support.microsoft.com/?id=317867[^](it is vb.net, 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!


这篇关于通过ASP.net C#将Gridview导出到Access数据库(.mdb)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆