mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Leave out "_binary" keyword on MSSQL when inserting binary files. Fixes issue #3244.
This commit is contained in:
@ -641,9 +641,12 @@ begin
|
|||||||
if Pos('%filecontent%', ColInfo.Value) > 0 then begin
|
if Pos('%filecontent%', ColInfo.Value) > 0 then begin
|
||||||
if not FileReadDone then begin
|
if not FileReadDone then begin
|
||||||
// Import binaries as-is (byte for byte), and auto-detect encoding of text files.
|
// Import binaries as-is (byte for byte), and auto-detect encoding of text files.
|
||||||
if FileInfo.IsBinary then
|
if FileInfo.IsBinary then begin
|
||||||
FileContent := '_binary 0x' + BinToWideHex(ReadBinaryFile(FileInfo.Filename, 0))
|
FileContent := '';
|
||||||
else
|
if FConnection.Parameters.NetTypeGroup = ngMySQL then
|
||||||
|
FileContent := '_binary ';
|
||||||
|
FileContent := FileContent + '0x' + BinToWideHex(ReadBinaryFile(FileInfo.Filename, 0))
|
||||||
|
end else
|
||||||
FileContent := esc(ReadTextfile(FileInfo.Filename, nil));
|
FileContent := esc(ReadTextfile(FileInfo.Filename, nil));
|
||||||
FileReadDone := True;
|
FileReadDone := True;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user