Record change by another

本文介绍了使用TClientDataSet组件时常见的几个问题及其解决方案,包括修改字段类型导致的Recordchangebyanother错误、IndexFieldNames设置不当引发的问题、TdataSetProvider配置注意事项以及删除记录时出现错误的情况。

1.TClientDataSet的Applyupdate提交时,报“Record change by another”
的原因之一,客户端字段类型FieldBCD的改成FieldFloat,相应的数据表字段
从Integer或Number修改成Float类型;

 

2.TClientDataSet的IndexFieldNames设置为空,不然保存后记录会跳动;

3.TdataSetProvider:
ResolveToDataSet=True
UpdateMode=upWhereChanged  (这里用UpdateWhereAll时,修改会报上面错误)

3.若保存没有提示"record change by another",但马上修改这笔记录后,保存提示上面error时,可以
在修改时增加以下函数:
procedure GetOnlyRec(rID: string);
begin
  with ClientDataSet1 do
  begin
    Close;
    CommandText := 'Select * from ErrorCtrl where ERRORID=''' + rID + '''';
    Open;
  end;
end;

4.删除记录,ApplyUpdate时提示上面error;

Requirements The code is tested on clean Ubuntu 20.04 with ROS noetic installation. Install the required package toppra: sudo pip3 install toppra catkin_pkg PyYAML empy matplotlib pyrfc3339 Run the code 1. Download and compile the code git clone https://github.com/ZJU-FAST-Lab/Primitive-Planner.git cd Primitive-Planner catkin_make -DCMAKE_BUILD_TYPE=Release 2. Generate the motion primitive library cd src/scripts python3 swarm_path.py The generated motion primitive library is stored in "src/planner/plan_manage/primitive_library/". 3. Run the planner In the "Primitive-Planner/" directory: source devel/setup.bash # or setup.zsh cd src/scripts python3 gen_position_swap.py 20 # It will generate the swarm.launch with 20 drones roslaunch primitive_planner swarm.launch Wait until all the nodes have their launch process finished and keep printing "[FSM]: state: WAIT_TARGET. Waiting for trigger". Open another terminal, publish the trigger cd src/scripts bash pub_trigger.sh Then the drones (drone number is 40) will start to fly like this Change the drone number when executing "python3 gen_position_swap.py <drone_number>". Before starting the "roslaunch" command, please open another terminal and run "htop" to monitor the Memory usage and CPU usage. Each drone requires about 200 MB memory. Keep the htop opened for entire flight. The computation time is printed on the terminal in blue text, named as "plan_time". To get the accurate computation time, please fix the CPU frequency to its maximum by sudo apt install cpufrequtils sudo cpufreq-set -g performance Otherwise the CPU will run in powersave mode with low frequency分析代码,生成复现过程
07-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值