Problem with a date

This is strange. I have a XData/WebCore application pair and this error does not arise on server 1, but does on servers 2 and 3. They connect to the same database and it only seems to be the one date field that has an issue. There are other TDateTime fields in the Entity/Table and they are all defined the same way:

 [Column('ArrivalDate', [])]
 FArrivalDate: TDateTime;
 [Column('FinalBalanceDueOn', [])]
 FFinalBalanceDueOn: TDateTime;

The FormatSettings date formats are the same on each machine.

The error received in the webapp after applying updates is:

Uncaught [object Object] | FMessage::Data update failed: Error Message: Could not convert database value to object member. Class name: TBooking Column name: FinalBalanceDueOn Attribute name: FFinalBalanceDueOn Database value: 2024-08-04 FHelpContext::0 FJSError::Error: Data update failed: Error Message: Could not convert database value to object member. Class name: TBooking Column name: FinalBalanceDueOn Attribute name: FFinalBalanceDueOn Database value: 2024-08-04 FStack::Error: Data update failed: Error Message: Could not convert database value to object member. Class name: TBooking Column name: FinalBalanceDueOn Attribute name: FFinalBalanceDueOn Database value: 2024-08-04 at Object.Create$1 (http://alpha/AlphaHolidays_1_0_561.js:3445:23) at c.$create

We've been trying all sorts of things, but can't get it to work. Any ideas?

Discovered that the field in the database is a date field not a datetime field (MS SQL database). I changed the definition in the entity to TDate, but this resulted in servers 2 & 3 returning a different error:

Uncaught [object Object] | FMessage::Data update failed: Error Message: [FireDAC][Phys][ODBC][Microsoft][ODBC SQL Server Driver]Optional feature not implemented FHelpContext::0 FJSError::Error: Data update failed: Error Message: [FireDAC][Phys][ODBC][Microsoft][ODBC SQL Server Driver]Optional feature not implemented FStack::Error: Data update failed: Error Message: [FireDAC][Phys][ODBC][Microsoft][ODBC SQL Server Driver]Optional feature not implemented at Object.Create$1 (http://alpha/AlphaHolidays_1_0_568.js:3445:23) at c.$create (http://alpha/AlphaHolidays_1_0_568.js:337:19) at

I changed the database field to datetime and the Entity back to TDateTime, which solved the issued on 2 & 3. But does not explain why in the original configuration of database field = date and Entity, TDateTime, it worked on server 1 but not on the other two.

Well, only you can tell the differences between server 1 and 2&3. Is it the same executable server, or compiled with different versions? Is it load balanced? Are the requests to those servers the same?

Maybe it helps if you can provide the call stack at the moment of the error at server side.

I'll try to have a look when I have a moment :joy:

Same executable, no load balancing.