如何从C#转换/导出SQL Server数据库MSACCESS [英] How to convert/export SQL Server database to MSAccess from c#
问题描述
我有一个SQL Server数据库,我需要所有的数据导出到一个Access MDB用户可以下载。什么是从C#这样做的最简单的方法是什么?
I have a SQL Server database, i need to export all of the data into an Access mdb that users can download. What's the simplest way of doing this from C#?
我知道我可以有一个空白(但在地方架构)MDB,而当我想导出我可以复制它,然后读取从SQL Server中的所有数据通过将数据集的mdb,但是,似乎是一个正确的faff。是否有更简单的方法?
I realise I could have a blank (but with schema in place) mdb, and when i want to export I could copy it, then read all the data from SQL Server into the mdb via datasets, but that seems like a right faff. Is there an easier way?
感谢
推荐答案
您可以创建DTS包做出口的,然后写一个C#应用程序执行DTS包,然后用户只需要执行你的C#应用程序?您还可以设置DTS包,如果你不希望用户交互就自动运行。
Could you create a DTS Package to do the export, then write a C# app to execute the DTS package, the user then just needs to execute your C# app? You could also set the DTS package to run automatically if you don't want user interaction.
这篇关于如何从C#转换/导出SQL Server数据库MSACCESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!