Hi,
We are using the FilterBuilder to create a criteria which is then passed to a ListGrid to query data from the database.
Our problem is that when we select the "equals / today" criteria on a datetime SQLServer columnn, the generated query contains a condition like this "CREATED = '2014-02-10T00:00:00'" which will not work as it's a datetime column.
Here is the issued DSRequest:
(I also attached a screen of the selected builder criteria)
Please also note that if, for any reason, SmartGWT decides to NOT fetch the data (willfetchdata returns false), the criteria is correctly applied... so there seem to be a mismatch between the JavaScript and the SQL logic there ?
Many thanks for your help,
Thomas
PS: SmartGWT 4.1d
We are using the FilterBuilder to create a criteria which is then passed to a ListGrid to query data from the database.
Our problem is that when we select the "equals / today" criteria on a datetime SQLServer columnn, the generated query contains a condition like this "CREATED = '2014-02-10T00:00:00'" which will not work as it's a datetime column.
Here is the issued DSRequest:
Code:
{ dataSource:"businessUnit", operationType:"fetch", componentId:"isc_FircoListGrid_0", data:{ operator:"and", criteria:[ { fieldName:"CREATED", operator:"equals", value:"2014-02-09T23:00:00" } ] }, startRow:0, endRow:75, textMatchStyle:"exact", resultSet:[ResultSet ID:isc_ResultSet_0 (created by: isc_FircoListGrid_0)], callback:{ caller:[ResultSet ID:isc_ResultSet_0 (created by: isc_FircoListGrid_0)], methodName:"fetchRemoteDataReply" }, willHandleError:true, showPrompt:true, prompt:"Finding Records that match your criteria...", oldValues:{ operator:"and", criteria:[ { fieldName:"CREATED", operator:"equals", value:"2014-02-09T23:00:00" } ] }, requestId:"businessUnit$62730", internalClientContext:{ requestIndex:13 }, useStrictJSON:true, fallbackToEval:true, lastClientEventThreadCode:"TMR0", bypassCache:true }
Please also note that if, for any reason, SmartGWT decides to NOT fetch the data (willfetchdata returns false), the criteria is correctly applied... so there seem to be a mismatch between the JavaScript and the SQL logic there ?
Many thanks for your help,
Thomas
PS: SmartGWT 4.1d
Comment