在C#中复制MS访问表? [英] Copying MS access table in C#?

查看:58
本文介绍了在C#中复制MS访问表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想在新的访问数据库表中复制选定的MS-Access数据库表。

我的应用程序正在检查-boxes用于选择要从访问数据库复制的表名,在选择时我需要创建新的访问数据库(.mdb)文件,并将特定选定的表从旧数据库复制到新创建的数据库。



我该怎么做?



请帮帮我...



谢谢...



我尝试了什么:



我试过了用于创建访问数据库的代码但这还不够。我不知道如何仅使用从旧到新的结构来复制表。

解决方案

Google [ ^ ]给出详细说明如何从Access获取表定义。



然后创建与新MDB的连接并创建表。

< br $>




复制源MDB,建立连接并删除未选中的表格。



然后从新M中的表中删除数据DB。

Hi,

I want to copy selected MS-Access database table in new access database table.
My application is having check-boxes to select table name to copy from access database and on selection i need to create new access database (.mdb) file and copy particular selected tables from old database to newly created database.

How can I do this?

Please help me...

Thanks...

What I have tried:

I have tried code to create access database but it is not sufficient. I don't know how to copy only table with it's structure from old to new one.

解决方案

Google[^] gives you details how to get the table definitions from Access.

Then you create a connection to your new MDB and create the tables.

OR

Copy the source MDB, make a connection to it and drop the table that are NOT selected.

Then delete the data from the tables in the new MDB.


这篇关于在C#中复制MS访问表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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