CanModify属性表示你能不修改。你看看这个值是true或false;
下面英文也介绍有些数据为什么不能修改。
indicates whether the dataset permits write access to data.
property CanModify: Boolean;
Description
As implemented in TDataSet, this property is False if the dataset is unidirectional, and True otherwise. Descendant classes reimplement this property as follows
For unidirectional datasets, CanModify is always False.
For client datasets, CanModify reflects the value of the ReadOnly property and whether a data provider supplied a read-only data packet.
下面英文也介绍有些数据为什么不能修改。
indicates whether the dataset permits write access to data.
property CanModify: Boolean;
Description
As implemented in TDataSet, this property is False if the dataset is unidirectional, and True otherwise. Descendant classes reimplement this property as follows
For unidirectional datasets, CanModify is always False.
For client datasets, CanModify reflects the value of the ReadOnly property and whether a data provider supplied a read-only data packet.
解决方案 »
- 快出来了!“未指定的错误” 不懂进来帮顶 3扣~~
- 如何实现在Delphi中,一个事件做完后,让主窗体上的小图标闪动两下啊
- 关于Dbedit的一个问题!急!
- 如何将Extended转换为integer?
- 请问IDNY里的IdFTPServer控件的什么函数或者属性可以知道是谁在连接我的FTP!就是想知道对方IP地址这样的信息!应该在什么地方?谢谢!
- 请教,一个帖子,没有任何人回答,如何结贴?
- FasteReport4 没有数据时也显示header内容
- Delphi创建对象崩溃的问题
- 数据库更新
- 问个基础问题,谁知道什么意思呢?//007pro
- 如何将PChar类型转为String类型?
- 拨号上169后,我用三层结构做的程序运行不了
FieldByName('Number').AsString:=CBNumber.Text ;
后的ADODataSet的State的值是什么?如果是dsBrowse 则表示你的字段的ONchange事件
将该adodataset的值给post掉了
begin //1
Open;
DisableControls;
try
Edit;//加入此使RateTable处于编辑状态下
insert;
IndexFieldNames:='Number';
FieldByName('Number').AsString:=CBNumber.Text ;
FieldByName('StandardRate').AsFloat:=StandardCount;
FieldByName('BackgroundRate').AsFloat:=BgAfterCount;
post;
finally
EnableControls;
end;
end;
Insert之前还要先edit吗??
begin //1
Open;
DisableControls;
try
insert;
IndexFieldNames:='Number';
FieldByName('Number').AsString:=CBNumber.Text ;
FieldByName('StandardRate').AsFloat:=StandardCount;
FieldByName('BackgroundRate').AsFloat:=BgAfterCount;
//
if state in [dsedit,dsinsert] then
post;
//
finally
EnableControls;
end;
end;
你是不是有一个字段的OnChange事件里面有东东?
如果是的话,检查一下看看嘛,把代码拿出来看看喽