Trying to modify read-only field(200分)

  • 主题发起人 主题发起人 comorange
  • 开始时间 开始时间
C

comorange

Unregistered / Unconfirmed
GUEST, unregistred user!
'Trying &nbsp; to &nbsp; modify &nbsp; read-only &nbsp; field'是什么错误? <br>现在字段readonly属性设置为False呀!还是会提示那个错误...我数据集是用ADO.因为里面是视图..
 
如果直接select * from 视图<br>应该不能直接modify的。<br>改成select * from table1, table2...<br>好了。
 
你修改了一个只读的字段,应该设置性性为edit
 
你是不是有自己加的字段啊。。
 
CREATE VIEW v_OA_GZQJB2View<br>AS<br>SELECT KQStatusID AS GZQJBID, GroupKQStatusID AS GZGKQStatusID,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CAST(CAST(DATEPART(year, OA_KQStatus.PerformDate) AS char(4))+ CAST(10 + DATEPART(month,OA_KQStatus.PerformDate) AS char(2)) AS INT) - 10 AS GZID,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SQRCode AS UserCode, PerformDate AS QJRQ,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Select sum(isnull(DQJ, 0)) from OA_JBDQJ where JBID=OA_KQStatus.KQStatusID) &nbsp;DJB,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SJJB AS DXX, QJHour AS QJKQ,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(case when &nbsp;(OA_KQStatus.SQType = '补打卡') &nbsp;then '忘打卡' else &nbsp;OA_KQStatus.QJLB &nbsp;end) AS QJType, <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (case when (OA_KQStatus.SQType = '补打卡') then 1 else 0 end) TypeID<br><br><br>FROM OA_KQStatus<br>WHERE (IsKnowSP = 1) AND( (SQType = '请假') or ((SQType = '补打卡') and (BDL=1)) )<br><br>UNION<br>SELECT GZQJBID, GZGKQStatusID, GZID, UserCode, QJRQ, DJB, DXX, QJKQ, QJType, 2 as TypeID <br>From &nbsp;OA_GZQJB<br>--------------这是我写视图
 
没有问题啊!<br>是否你的类似DBGrid空间有写权限出的错?
 
来自:Corn3 &nbsp; 对,视图是用来查询的
 
视图是只读的,不允许修改;
 
视图是只读的,不允许修改......
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
540
import
I
I
回复
0
查看
508
import
I
后退
顶部