为表单创建数据环境

      数据库学习笔记 2007-4-1 15:16
**这里路径有问题
LOCAl sf
sf='alink1'
SELECT * FROM ( ;
SELECT '各服务部'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE L101=132 UNION ;
SELECT '下属'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE L101=112 UNION ;
SELECT '销售门市部'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE (L101=132 OR L101=133) OR l101<>13206 UNION ;
SELECT '其他有关部门'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE (L101=132 OR L101=113)) aa  INTO CURSOR Aa
USE IN &sf
WITH this
    .AddObject('dd','dataenvironment')
    .dd.addobject('cursor1','cursor')
    .dd.cursor1.alias='aa'
    .dd.cursor1.buffermodeoverride=2
   .cbgrid1.RecordSourceType= 1
   .cbgrid1.RecordSource='aa'  
ENDWITH
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}