当前位置: 代码迷 >> VFP >> VFP数据环境的属性用命令写,该如何处理
  详细解决方案

VFP数据环境的属性用命令写,该如何处理

热度:7033   发布时间:2013-02-26 00:00:00.0
VFP数据环境的属性用命令写
VFP数据环境的属性用命令怎么选写啊???
要什么命令??

------解决方案--------------------------------------------------------
THISFORM.DATAENVIRONMENT.属性名
如:
THISFORM.DataEnvironment.AutoOpenTables=.t.
------解决方案--------------------------------------------------------
写在INIT里
------解决方案--------------------------------------------------------
FORM的INIT主要代码如下:
ThisForm.DataEnvironment.CloseTables()
ThisForm.DataEnvironment.AddObject( 'Cursor_ '+ 'd_shd ', 'cursor ')
oCursor1=Evaluate( 'ThisForm.DataEnvironment.Cursor_ '+ 'd_shd ')
oCursor1.CursorSource= 'd_shd '
oCursor1.Alias= 'd_shd '
oCursor1.Exclusive=.T.

ThisForm.DataEnvironment.AddObject( 'Cursor_ '+ 'd_ckgl ', 'cursor ')
oCursor2=Evaluate( 'ThisForm.DataEnvironment.Cursor_ '+ 'd_ckgl ')
oCursor2.CursorSource= 'd_ckgl '
oCursor2.Alias= 'd_ckgl '
ThisForm.DataEnvironment.OpenTables()
oCursor2.Exclusive=.T.

SELECT( 'd_shd ')
ZAP
SELECT( 'd_ckgl ')
ZAP
  相关解决方案