mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Quote db and table name in new function TDBObject.QuotedDbAndTableName, which also adds "dbo" for MS SQL inbetween. Plus, run SELECT in SQL export through ApplyLimitClause, to fix an SQL error on MS SQL. See http://www.heidisql.com/forum.php?t=11956
This commit is contained in:
@ -1391,7 +1391,13 @@ begin
|
||||
Output('DELETE FROM '+TargetDbAndObject, True, True, True, True, True);
|
||||
Output('/*!40000 ALTER TABLE '+TargetDbAndObject+' DISABLE KEYS */', True, True, True, True, True);
|
||||
while true do begin
|
||||
Data := DBObj.Connection.GetResults('SELECT * FROM '+DBObj.QuotedDatabase+'.'+DBObj.QuotedName+' LIMIT '+IntToStr(Offset)+', '+IntToStr(Limit));
|
||||
Data := DBObj.Connection.GetResults(
|
||||
DBObj.Connection.ApplyLimitClause(
|
||||
'SELECT',
|
||||
'* FROM '+DBObj.QuotedDbAndTableName,
|
||||
Limit,
|
||||
Offset)
|
||||
);
|
||||
Inc(Offset, Limit);
|
||||
if Data.RecordCount = 0 then
|
||||
break;
|
||||
|
Reference in New Issue
Block a user