错误信息:
Couldn't perform the Edit because another user changed the record!
不知用Tquery组件如何修改数据库,是不是调用query1.open/execSQL后
还要query1.applyUpdates 或者更多
Couldn't perform the Edit because another user changed the record!
不知用Tquery组件如何修改数据库,是不是调用query1.open/execSQL后
还要query1.applyUpdates 或者更多
直接query1.applyUpdates
如果你是用SQL语句实现的话就execSQL
//主要是原来的数据库没有ID字段,现在添加并编号
//以下程序是我默写的,编译已通过,所以语法不是问题
i:=1;
query1.first;
while not query1.Eof do
begin
query1.edit;
query1.fieldbyname("ID").asstring:=inttostr(i);
query1.post;
query1.next;
i:=i+1;
end;
try
query1.applyUpdates;
....
.....我已经重起好几次了
Access也关了
但是不行
又用原来的备份数据库替换,还是不行
那我怎么才能让数据库不处于Edit状态呢