You are not logged in.
Pages: 1
when I do report, i use ExecuteJson to get a sql json resut, then convert to TSynSQLTableDataSet,
json := Client.ExecuteJson([], DataSetSql);
JSONTODataSet(nil, Json),
just found, if there is only one row, if a RawUTF8 string field has 2017-02-27 content,
in the json content look like this, "XXX":"2017-02-27", then report engline use
FValue := DataSet.Value[DataField];
to get value will generate AV '0.42793' is not a valid timestamp, seems the underline
field treat as datetime, how can resolve this.
Any help very thanks!
update:
I think if can manul set the field type, then will ok, I'll test this method.
update2:
Seems the under TSQLTable can SetFieldType, but the TSynSQLTableDataSet's field type
can't change, in
function TSynVirtualDataSet.GetFieldData(Field: TField; Buffer: Pointer): Boolean;
Data := GetRowFieldData(Field,RowIndex,DataLen,OnlyTestForNull);
GetRowFieldData can work, but next run to
ftDateTime:
PDateTimeRec(Dest)^.DateTime := PDateTime(Data)^;
after that has become '0.0' is not a valid timestamp
update 3:
First create a TSQLTable, manual set field type, then use it create DataSet seems resolve the problem.
Mingda
Last edited by mingda (2017-03-09 14:35:38)
Offline
What version of mORMot are you using?
Offline
For me, the last good mORMot commit is 938ae78a5b5ecb464e8e0d7d8544ba3a9e09eb38, january, 23. Every commit after that raises '0.4<something> is not valid timestamp'.
Offline
I had this problem in my https://synopse.info/forum/viewtopic.ph … 511#p23511 and I had patch the DataConvert procedure. Try to use my TSynRestDataset to test if it works for you.
Best regards.
Esteban
Esteban
Offline
@Junior/RO
I use 3469,
@EMartin
Sorry, I can't reach the google site, only update from ab's
thank you two!
Offline
Indeed,
So i use version c8915b80ceef724651b4e97e7f222cd83de69bbb in 2017/1/20.
Offline
Pages: 1