Hi,
I use traccar 4.6 and i want to insert som data to another table when receive a new position (table tc_position)
this is my configuration in config/traccar.xml
<entry key='database.insertPosition'>
START TRANSACTION;
SELECT @accountID := accountID, @objectID := isAttached FROM tc_devices WHERE id = :deviceid;
INSERT INTO eventdata (accountID, objectID, deviceID, timestamp, statusCode, latitude, longitude, speedKPH, heading, altitude, rawData, creationTime, address, batteryVolts)
VALUES (@accountID, @objectID, :deviceid, :servertime, 0, :latitude, :longitude, speed*1.852, :course, :altitude, :extended_info, UNIX_TIMESTAMP(NOW()), :address, :accuray);
COMMIT;
</entry>
Here is a snippet of error log
2020-04-14 13:56:21 WARN: Failed to store position - No value specified for parameter 8 - SQLException (... < QueryBuilder:480 < DataManager:458 < DefaultDataHandler:40 < ...)
2020-04-14 13:56:21 INFO: [c0419760] id: 359710047375937, time: 2020-04-14 13:56:18, lat: 18.09705, lon: -15.96313, course: 0.0
2020-04-14 13:56:51 INFO: [c0419760: gps103 < 41.188.67.171] HEX: 696d65693a3335393731303034373337353933372c747261636b65722c3230303431343231353635302c2c462c3133353634382e3030302c412c313830352e383233322c4e2c30313535372e373837392c572c302e30302c303b
2020-04-14 13:56:51 WARN: Failed to store position - No value specified for parameter 8 - SQLException (... < QueryBuilder:480 < DataManager:458 < DefaultDataHandler:40 < ...)
2020-04-14 13:56:51 INFO: [c0419760] id: 359710047375937, time: 2020-04-14 13:56:48, lat: 18.09705, lon: -15.96313, course: 0.0
I can't understand what went wrong. Any help please?
Hi,
I use traccar 4.6 and i want to insert som data to another table when receive a new position (table tc_position)
this is my configuration in config/traccar.xml
<entry key='database.insertPosition'> START TRANSACTION; SELECT @accountID := accountID, @objectID := isAttached FROM tc_devices WHERE id = :deviceid; INSERT INTO eventdata (accountID, objectID, deviceID, timestamp, statusCode, latitude, longitude, speedKPH, heading, altitude, rawData, creationTime, address, batteryVolts) VALUES (@accountID, @objectID, :deviceid, :servertime, 0, :latitude, :longitude, speed*1.852, :course, :altitude, :extended_info, UNIX_TIMESTAMP(NOW()), :address, :accuray); COMMIT; </entry>
Here is a snippet of error log
I can't understand what went wrong. Any help please?