使用Access复制Dbase数据/从Dbase数据复制 [英] Copying to/from Dbase data using Access

查看:71
本文介绍了使用Access复制Dbase数据/从Dbase数据复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对使用dBase IV的一些旧版后端感到困惑,并希望能够使用Access前端将记录从一个表复制到另一个表.简单的答案是链接到源表和目标表并运行INSERT查询或类似查询.

I am stuck with some legacy back ends using dBase IV, and would like to be able to copy records from one table to another using an Access front end. The simple answer would be to link to the source and destination tables and run an INSERT query or similar.

但是,在我的情况下,后端不是单个DBF文件,但是我需要动态链接到数百个文件以进行复制操作.当前,每次我希望执行复制操作时,都必须使用TableDefs属性(在VBA中)更改和刷新链接定义.

However, in my situation, the back end is not a single DBF file, but there are several hundred files that I need to dynamically link to for the copy operation. Currently I have to change and refresh the link definition using the TableDefs property (in VBA) every time I wish to perform the copy operation.

捕获是前端共享,这意味着每个用户都必须拥有FE的单独副本,以便链接表定义不会被另一个用户修改.

The catch is the front end is shared, meaning that each user has to have a separate copy of the FE so that the linked table definitions are not modified by another user.

我想知道是否有一种简单的方法可以在不使用链接表的情况下做到这一点?我可以打开到源和目标的DAO连接,但是找不到任何简单的复制记录的方法(一次只能复制一次).反正周围有吗?

I was wondering is there an easy way to do this without using linked tables? I could open DAO connections to the source and destination but cannot find any simple way of copying the records (apart from one at a time). Are there anyways around this?

推荐答案

可以使用插入到另一个位置的DBF中的链接DBF来运行查询:

It is possible to run a query using the linked DBF that inserts into a DBF in another location:

INSERT INTO [dBASE III;DATABASE=z:\docs\].[dbf2.dbf]
SELECT *
FROM dbf1;

INSERT  INTO dbf1
SELECT *
FROM  [dBASE III;DATABASE=z:\docs\].[dbf2.dbf];

这篇关于使用Access复制Dbase数据/从Dbase数据复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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