mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Fix empty query body when deleting grid rows in MSSQL mode, broken in b9b5976413dc6ff35e9e947816cc7264161b88f1. Closes #1294
This commit is contained in:
@ -6696,7 +6696,7 @@ begin
|
|||||||
Result := QueryType + ' ';
|
Result := QueryType + ' ';
|
||||||
case FParameters.NetTypeGroup of
|
case FParameters.NetTypeGroup of
|
||||||
ngMSSQL: begin
|
ngMSSQL: begin
|
||||||
if QueryType = 'UPDATE' then begin
|
if (QueryType = 'UPDATE') or (QueryType = 'DELETE') then begin
|
||||||
// TOP(x) clause for UPDATES + DELETES introduced in MSSQL 2005
|
// TOP(x) clause for UPDATES + DELETES introduced in MSSQL 2005
|
||||||
if ServerVersionInt >= 900 then
|
if ServerVersionInt >= 900 then
|
||||||
Result := Result + 'TOP('+IntToStr(Limit)+') ';
|
Result := Result + 'TOP('+IntToStr(Limit)+') ';
|
||||||
@ -6711,7 +6711,8 @@ begin
|
|||||||
// OFFSET not supported in < 2012
|
// OFFSET not supported in < 2012
|
||||||
Result := Result + 'TOP ' + IntToStr(Limit) + ' ' + QueryBody;
|
Result := Result + 'TOP ' + IntToStr(Limit) + ' ' + QueryBody;
|
||||||
end;
|
end;
|
||||||
end;
|
end else
|
||||||
|
Result := Result + QueryBody;
|
||||||
end;
|
end;
|
||||||
ngMySQL: begin
|
ngMySQL: begin
|
||||||
Result := Result + QueryBody + ' LIMIT ';
|
Result := Result + QueryBody + ' LIMIT ';
|
||||||
|
Reference in New Issue
Block a user