将数据从SqlServer导出到MsAccess Asp.net,C# [英] Export data From SqlServer to MsAccess Asp.net, C#

查看:253
本文介绍了将数据从SqlServer导出到MsAccess Asp.net,C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

sqlserver中有一个表,它包含很多字段,但我只想将名称,地址,联系人,电子邮件导出到ms-access表。在asp.net c#。

任何人都请帮忙。

Hello,
There is a table in sqlserver it contains many fields but i want to export only Name,Address,Contact,Email to ms-access table.In asp.net c#.
Any one please help.

推荐答案

你需要按照以下步骤 -

1.连接到sql server和运行具有所需列名称的数据的查询

2.将结果存储到数据表中

3.连接到MS Access DB

4.循环每行的数据表

5.在循环内部为MS Access表格插入查询



如果这不是''请帮忙或者您需要任何代码帮助或一些示例代码,请回复。
You need to follow following steps-
1. Connect to sql server and run the query for the data with desired column names
2. Store the result in to a datatable
3. Connect to MS Access DB
4. Loop the datatable for each row
5. Inside the loop witer the insert query for MS Access table

In case this doesn't help or you need any code help or some sample code, please reply.


您好,



仅选择姓名,地址,联系人,电子邮件列和插入访问表。



对于类似主题,请参阅



HTTP: //stackoverflow.com/questions/16038780/export-mssql-database-to-ms-access-accdb-file [ ^ ]


这篇关于将数据从SqlServer导出到MsAccess Asp.net,C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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