让我们改变字段!
用Database DeskTop的ParaDox7定义了一个L型的字段Yijie;
由UpdateSQL1的ModifySQL定义。
update "Book.DB"
set
Yijie = :Yijie
where
Suoshuhao = :OLD_Suoshuhao(Suoshuhao是主索引字段)
同时在一个Button事件中,编辑如下:
if Query2.FieldByName('Yijie').AsBoolean then
ShowMessage('该书已经借出!')
else
begin
Query2.Edit;
Query2.FieldByName('Yijie').AsBoolean:= True;
Query2.ApplyUpdates;
end;
但每次一按确定,他提示我query2:cannot modified a read-only dataset
不知为什么?