mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Bugfix: avoid calling FieldByName() with a field name that doesn't exist, it causes an exception. Fixes issue #1118.
This commit is contained in:
@ -260,9 +260,9 @@ begin
|
||||
zq := Mainform.FetchActiveDbTableList;
|
||||
while not zq.Eof do begin
|
||||
if zq.FieldByName(DBO_NAME).AsWideString = oldTableName then begin
|
||||
if zq.FieldByName(DBO_COLLATION).AsString <> '' then
|
||||
if (zq.FindField(DBO_COLLATION) <> nil) and (zq.FieldByName(DBO_COLLATION).AsString <> '') then
|
||||
strquery := strquery + ' COLLATE ' + zq.FieldByName(DBO_COLLATION).AsString;
|
||||
if zq.FieldByName(DBO_ENGINE).AsString <> '' then
|
||||
if (zq.FindField(DBO_ENGINE) <> nil) and (zq.FieldByName(DBO_ENGINE).AsString <> '') then
|
||||
strquery := strquery + ' ENGINE=' + zq.FieldByName(DBO_ENGINE).AsString;
|
||||
break;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user