数据库 sql 2005,PB 使用动态创建dw。通过查看 syntax 得到下面问题:
(1)我使用 sa 账户登陆,生成的dw,结果表是可写的,字段也都是可写的,字段的tabsequnence 大于0;
(2)我使用 非 sa 账户登陆-----注意该账户已经授权了 insert, delete, update 操作权限,生成的dw,结果表是不可写的,字段也都是不可写的,字段的tabsequnence 没有设置(通过打印看是0);
下面是打印出来的(摘录)
sa 账户:
column=(type=char(100) update=yes updatewhereclause=yes name=家庭地址 dbname="T_Patient.家庭地址" )
update="t_patient" updatewhere=1 updatekeyinplace=no
column(name=家庭地址 band=detail id=7 x="2560" y="8" height="64" width="2309" color="0" border="0" alignment="0" format="[general]" edit.focusrectangle=no edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=100 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no edit.useellipsis=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" background.gradient.color="8421504" background.brushmode="0" background.gradient.repetition.mode="0" background.gradient.repetition.length="100" background.gradient.repetition.count="0" background.gradient.scale="100" background.gradient.spread="100" tooltip.enabled="0" tooltip.isbubble="0" tooltip.textcolor="134217751" tooltip.backcolor="134217752" tooltip.icon="0" tooltip.delay.visible="32000" tooltip.delay.initial="0" font.charset="0" font.face="Tahoma" font.family="2" font.height="-8" font.italic="0" font.pitch="2" font.strikethrough="0" font.weight="400" font.underline="0" tabsequence=70 )
非 sa 账户:
column=(type=char(100) updatewhereclause=yes name=家庭地址 dbname="家庭地址" )
text(name=家庭地址_t band=header font.charset="0" font.face="Tahoma" font.family="2" font.height="-8" font.italic="0" font.pitch="2" font.strikethrough="0" font.weight="400" font.underline="0" tooltip.enabled="0" tooltip.isbubble="0" tooltip.textcolor="134217751" tooltip.backcolor="134217752" tooltip.icon="0" tooltip.delay.visible="32000" tooltip.delay.initial="0" background.mode="1" background.color="536870912" background.gradient.color="8421504" background.brushmode="0" background.gradient.repetition.mode="0" background.gradient.repetition.length="100" background.gradient.repetition.count="0" background.gradient.scale="100" background.gradient.spread="100" color="0" alignment="2" border="0" x="2560" y="8" height="52" width="2309" text="家庭地址" )
大家注意到吗,前者dbname中写的是 "T_Patient.家庭地址",后面的是 "家庭地址"
这样导致的结果是,使用不同的账号时,表可能不能修改了。
尽管我想到了脚本的办法解决这个问题,但是感觉还确实个问题,请大家分析出现这样的原因是什么!
------解决方案--------------------
应该是表的所属问题,sql2005增加了架构 - 用户 - 表的概念。需要研究了