You are not logged in.
Pages: 1
sqlite3 db, a strange problem, from webclient, use BatchInsert, when only insert one row, in response text, can return the Insert ID, but when insert multi row, in response text, always return 0 ID
'["automaticTransactionPerRow",2147483647,"POST@test",{"ID":null,"Name":"B001","Question":"B001","Time":null}]'
return [87]
'["automaticTransactionPerRow",2147483647,"POST@test",{"ID":null,"Name":"A001","Question":"A001","Time":null},"POST@test",{"ID":null,"Name":"A002","Question":"A002","Time":null},"POST@test",{"ID":null,"Name":"A003","Question":"A003","Time":null}]'
return [0,0,0]
use version 2929
thanks
Offline
use DelphiXE, for multi row insert, every loop EngineAdd return 0, but for single row, return correct ID, thanks!
Offline
Please enable the verbose logs and try to find out what occurred as server-side error.
I'm quite sure you will find some explicit error in the logs.
From the web client side, "ID":null and "Time":null values are IMHO incorrect.
Such fields should be just not part of the sent object.
Perhaps the null is converted into 0 on the server side...
Offline
Such invalid input will now be handled as "ID":0 thanks to http://synopse.info/fossil/info/8ac7d70abc
Offline
The problem is indeed "ID":null caused, remove it works, I will update source to test, thank you very much!
Offline
Pages: 1