diff --git a/source/insertfiles.pas b/source/insertfiles.pas index d391c7ad..1e4f5f96 100644 --- a/source/insertfiles.pas +++ b/source/insertfiles.pas @@ -641,9 +641,12 @@ begin if Pos('%filecontent%', ColInfo.Value) > 0 then begin if not FileReadDone then begin // Import binaries as-is (byte for byte), and auto-detect encoding of text files. - if FileInfo.IsBinary then - FileContent := '_binary 0x' + BinToWideHex(ReadBinaryFile(FileInfo.Filename, 0)) - else + if FileInfo.IsBinary then begin + FileContent := ''; + if FConnection.Parameters.NetTypeGroup = ngMySQL then + FileContent := '_binary '; + FileContent := FileContent + '0x' + BinToWideHex(ReadBinaryFile(FileInfo.Filename, 0)) + end else FileContent := esc(ReadTextfile(FileInfo.Filename, nil)); FileReadDone := True; end;