VFP数据库设置表间临时关系

来源:百度知道 编辑:UC知道 时间:2024/07/07 06:14:25
如何在VFP数据库中设置表间临时关系,那个能告诉我啊,越详细越好。

用 set relation to 请看我的实例(租赁结算的一个小子过程)及set relation to语法:
---------------------------------------------------
PROCE SDL42_1
*租赁结算--按工地对账方式进行结算
select 8
use .\dbf\dssl &&丢失数量

select 1
use .\dbf\dwname
zldm00=zldm
name0=c
use

zldm00 = ".\dbf\kcwzcbj."+zldm00
use (zldm00) Alias kcwzcbjX
index on dm to .\idx\dm0

select 8
set relation to dm into kcwzcbjX && 8区dssl与价格库 1 区 相联
&&这样8区移动指针,相应的1区指针也随着移动
go top
do while .not. eof()
replace dm with dssl->dm, sl with dssl->sl
replace zsl with djmj*sl
skip
enddo
--------------------------------------------------------
set relation 命令

在两个打开的表之间建立关系。

语法

SET RELATION TO
[eExpression1 INTO nWorkArea1 | cTableAlias1
[, eExpression2 INTO nWorkArea2 | cTableAlias2 ...]
[IN nWorkArea | cTableAlias]
[ADDITIVE]]