You are not logged in.
Pages: 1
Hi,
I am trying to export data from SQL Server to SQLite
I am using TOleDBMSSQL2012ConnectionProperties to connect to the source.
I then use this code
Query.Execute(psQryText,true,[]);
SetLength(ColTypes, Query.ColumnCount);
for idx := 0 to Query.ColumnCount - 1 do
ColTypes[idx] := Query.ColumnType(idx);
lpoConnExt.NewTableFromRows(psFileName, Query ,True,ColTypes);
Query.Free;
The Query statement reads from a view.
The DateTime types are saved as text.
Is there a way to ensure the correct data types in the destination table ?
Best regards,
JM
Offline
There is no native date/time type in SQLite3, as there is with MSSQL.
Iso8601 text is a valid way to store SQLite3 date/time.
https://www.sqlite.org/datatype3.html#d … e_datatype
Offline
Thanks Arnaud.
The problem occurs when I reload the data with firedac TBatchMove in the destination database : it complains about the format difference (text vs DateTime)
I guess my "mix" is not right
Offline
Pages: 1