#1 2016-01-25 11:33:17

dolfin
Member
Registered: 2015-09-11
Posts: 22

Error on call TSQLHttpClientWinHTTP.UpdateField

Hello!

I faced with strange behavior while call method TSQLHttpClientWinHTTP.UpdateField on class inherited from TSQLRecord which contains TRecordVersion type property. If there is a published property of type TRecordVersion in class inherited from TSQLRecord then call of method TSQLHttpClientWinHTTP.UpdateField produces the following error:

20160124 17052021  C ERROR mORMotSQLite3.TSQLRestServerDB(032FA430) {"EORMException(04133CD0)":{"Message":"TSQLRestServerDB.GetAndPrepareStatement(UPDATE SrvMamClient SET TaskCount=?,TSQLPropInfoRTTIRecordVersion=? WHERE RowID=?) recognized 3 params, and 0 for SQLite3"}} for UPDATE SrvMamClient SET TaskCount=:(1):,TSQLPropInfoRTTIRecordVersion=:(1579848): WHERE RowID=:(1): // UPDATE SrvMamClient SET TaskCount=?,TSQLPropInfoRTTIRecordVersion=? WHERE RowID=?

Please check the code below:

  HttpClient: TSQLHttpClientWinHTTP;
  TSrvMamClient: TSQLRecord;
  HttpClient.UpdateField(TSrvMamClient, 1, 'TaskCount', 1)

If I comment property of type TRecordVersion in TSrvMamClient class everything works fine.

Offline

#2 2016-01-25 13:37:10

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Error on call TSQLHttpClientWinHTTP.UpdateField

Did you use latest framework version?

What is the stack trace of the exception on server side?

Offline

#3 2016-01-25 14:32:11

dolfin
Member
Registered: 2015-09-11
Posts: 22

Re: Error on call TSQLHttpClientWinHTTP.UpdateField

Yes, I used version '1.18.2291'.

stack trace API 00553E62
005C41FF 00619112 0061AA78 0061ADF3 005C7D3C 0061C470 005DF5E8 005D5BBC 00604FFC 0054BF5A 0054B9D7 004C4A8C 0040B51A 754F338A 772497F2 772497C5

I can provide you with test project (modified 04 - HTTP Client-Server) if necessarily.

Last edited by dolfin (2016-01-25 14:34:24)

Offline

#4 2016-01-25 15:49:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Error on call TSQLHttpClientWinHTTP.UpdateField

The stack trace without the line numbers is pointless.
Please compile your exe with detailed map file option from your project settings.

Offline

#5 2016-01-26 12:53:23

dolfin
Member
Registered: 2015-09-11
Posts: 22

Re: Error on call TSQLHttpClientWinHTTP.UpdateField

Please check the log below:

20160126 12411953  C ERROR mORMotSQLite3.TSQLRestServerDB(03BAB390) {"EORMException(03E6A680)":{"Message":"TSQLRestServerDB.GetAndPrepareStatement(UPDATE SrvMamClient SET TaskCount=?,TSQLPropInfoRTTIRecordVersion=? WHERE RowID=?) recognized 3 params, and 0 for SQLite3"}} for UPDATE SrvMamClient SET TaskCount=:(2):,TSQLPropInfoRTTIRecordVersion=:(1771): WHERE RowID=:(3): // UPDATE SrvMamClient SET TaskCount=?,TSQLPropInfoRTTIRecordVersion=? WHERE RowID=? stack trace API 005C79EB mORMot.TSQLRest.InternalLog (31496) 0061E9D6 mORMotSQLite3.TSQLRestServerDB.GetAndPrepareStatementRelease (767) 00620393 mORMotSQLite3.TSQLRestServerDB.InternalExecute (1152) 0062070F mORMotSQLite3.TSQLRestServerDB.EngineExecute (1213) 005CB61C mORMot.TSQLRest.ExecuteFmt (32641) 00621E2E mORMotSQLite3.TSQLRestServerDB.MainEngineUpdateField (1499) 005E3A38 mORMot.TSQLRestServer.EngineUpdateField (39014) 005D9F0E mORMot.TSQLRestServerURIContext.ExecuteORMWrite (36869) 006096BC mORMot.BackgroundExecuteProc (51396) 0054DB62 SynCommons.TSynBackgroundThreadMethod.Process (52119) 0054D5DF SynCommons.TSynBackgroundThreadAbstract.Execute (51988) 004C4A8C System.Classes.ThreadProc (14361) 0040B51A System.ThreadWrapper (24233)

Offline

#6 2016-01-28 15:26:45

dolfin
Member
Registered: 2015-09-11
Posts: 22

Re: Error on call TSQLHttpClientWinHTTP.UpdateField

Hi!

Do you have any news on the issue?
May be you need something else for investigations?

Offline

#7 2019-10-21 16:21:43

vs
Member
Registered: 2019-10-21
Posts: 36

Re: Error on call TSQLHttpClientWinHTTP.UpdateField

Looks like it's already fixed.
Please check https://synopse.info/fossil/info/530adf5475e9af5

ab,
Is it by design, that in mORMotDB.TSQLRestStorageExternal.EngineUpdateField/EngineUpdateFieldIncrement no update of TRecordVersion fields?
Thanks.

Offline

Board footer

Powered by FluxBB