本文整理自网络,侵删。
用firedac连接SQLITE数据库,空间tdbedit绑定字段name,如下语句修改其值时报错。
procedure TForm1.Button3Click(Sender: TObject);begin
fdquery.Edit; fdquery.FieldByName('name').AsString:='test2'; fdquery.post; //执行到这里报错 [FireDAC][Phys][SQLite] ERROR: database is locked. 换成refresh也一样。
end;
设置SQLITE的连接参数 LockingMode=normal 解决了
相关阅读 >>
Delphi研究之驱动开发篇(六)--利用section与用户模式程
Delphi 10.3 调试程序时出错:unable to create process:请求的操作需要提升
Delphi firedac 下的 sqlite [10] - 使用 r-tree 搜索
更多相关阅读请进入《Delphi》频道 >>