#1 2017-06-04 04:09:15

ken
Member
Registered: 2016-07-15
Posts: 9

Raise error with message '0.41841' is a not valid timestamp

I am bad english. Sorry

Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
  with TSynDBDataSet.Create(Self) do
  begin
    Connection := fProps; // connect sql server2008
    CommandText := 'Select CardID,CardName,CreDate From Card'; // datatype: CardID int, CardName nvarchar(50), CreDate datetime
    IgnoreColumnDataSize := true;
    Open;

    First;
    while not Eof do
    begin
      Memo1.Lines.Add(FieldByName('CardID').AsString);
      Memo1.Lines.Add(FieldByName('CardName').AsString);
      Memo1.Lines.Add(FieldByName('CreDate').AsString); // raise error: '0.41841' is a not valid timestamp

      Next;
    end;
  end;
end;

Offline

#2 2017-06-04 13:56:58

igors233
Member
Registered: 2012-09-10
Posts: 241

Re: Raise error with message '0.41841' is a not valid timestamp

This seems to be similar as these questions:
https://synopse.info/forum/viewtopic.php?pid=23574
https://synopse.info/forum/viewtopic.php?pid=24084


Perhaps it's somehow related to not handling doubles by default as in https://synopse.info/forum/viewtopic.php?pid=23228.
In some cases dvoAllowDoubleValue needs to be explicitly included but I have no idea where to add it in your case.
Definitelly try with latest nightly build and if you get error again, try to prepare some reproducible test case (best with sqlite) and post it as a bug.

Offline

Board footer

Powered by FluxBB