You are not logged in.
Pages: 1
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
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
Yes the Content-Encoding header was missing in the respose build by the server.
Many thanks for this awesome work !
Hi,
I'm trying Mormot in a rest service context. The entry sends the result as stream.
I'm using
<Code>
...
Props := TSQLDBFireDACConnectionProperties.Create('MSSQL?Server=' + lsServerName ,lsDatabaseName,lsUserName,lsPassword);
...
try
Conn := Props.NewConnection;
try
Conn.Connect;
Query := Conn.NewStatement;
try
lpoS := TMemoryStream.Create;
Query.Execute(lsSql,true,[]);
Query.FetchAllToJSON(lpoS,true);
Result := lpoS;
finally
Query.Free;
end;
finally
Conn.Free;
end;
finally
Props.Free;
end;
</Code>
The result is fine except for french accents :
{"RefValueId":8000000000050100062,"Label":"Négociateur GIE AC"},{"RefValueId":8000000000050100063,"Label":"Négociateur GIE AEC"}
Is there something to do to force character encoding ?
Database server is SQL Server 2012
Columns in database table are NVARCHAR(xx)
IDE is Delphi 10.3.3
Regards,
JM
Pages: 1