diff --git a/out/sqlite3-64.dll b/out/sqlite3-64.dll index ae8492c56..cb279efd6 100644 Binary files a/out/sqlite3-64.dll and b/out/sqlite3-64.dll differ diff --git a/out/sqlite3mc-64.dll b/out/sqlite3mc-64.dll index 9affcfb99..d21fd0bdc 100644 Binary files a/out/sqlite3mc-64.dll and b/out/sqlite3mc-64.dll differ diff --git a/res/version.rc b/res/version.rc index d2945a400..5a537ff9f 100644 --- a/res/version.rc +++ b/res/version.rc @@ -1,5 +1,5 @@ 1 VERSIONINFO - FILEVERSION 12,20,0,0 + FILEVERSION 12,21,0,0 FILEOS VOS__WINDOWS32 FILETYPE VFT_APP BEGIN diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 0ae9b8084..4cfc0436a 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -5514,12 +5514,14 @@ function TDBConnection.FindObject(DB, Obj: String): TDBObject; var Objects: TDBObjectList; o: TDBObject; + fqname: String; begin // Find TDBObject by db and table string Objects := GetDBObjects(DB); Result := nil; for o in Objects do begin - if o.Name = Obj then begin + fqname := o.Schema + '.' + o.Name; // includes "dbo." schema + if (o.Name = Obj) or (fqname = Obj) then begin Result := o; Break; end; @@ -9583,7 +9585,7 @@ procedure TDBQuery.DeleteRow; TempRowsAffected := Connection.RowsAffected; Connection.ShowWarnings; if TempRowsAffected = 0 then - raise EDbError.Create(FormatNumber(TempRowsAffected)+' rows deleted when that should have been 1.'); + raise EDbError.Create(f_('The DELETE affected %s rows, but 1 was expected. On tables without a primary or unique key, HeidiSQL must match on all columns, so edits may not reliably target the intended row.', [FormatNumber(TempRowsAffected)])); end; if Assigned(FCurrentUpdateRow) then begin FUpdateData.Remove(FCurrentUpdateRow); @@ -9848,7 +9850,7 @@ function TDBQuery.SaveModifications: Boolean; TempRowsAffected := Connection.RowsAffected; Connection.ShowWarnings; if TempRowsAffected = 0 then begin - raise EDbError.Create(FormatNumber(TempRowsAffected)+' rows updated when that should have been 1.'); + raise EDbError.Create(f_('The UPDATE affected %s rows, but 1 was expected. On tables without a primary or unique key, HeidiSQL must match on all columns, so edits may not reliably target the intended row.', [FormatNumber(TempRowsAffected)])); Result := False; end; end; diff --git a/source/main.pas b/source/main.pas index 16cbf4d13..0f3e8d921 100644 --- a/source/main.pas +++ b/source/main.pas @@ -8638,14 +8638,16 @@ function TMainForm.FindDBObjectNode(Tree: TBaseVirtualTree; Obj: TDBObject): PVi end; // Search in grouped table/view/... nodes - GroupedNode := Tree.GetFirstChild(ObjectNode); - while Assigned(GroupedNode) do begin - GroupedObj := Tree.GetNodeData(GroupedNode); - if GroupedObj.IsSameAs(Obj) then begin - Result := GroupedNode; - break; + if ObjectObj.NodeType = lntGroup then begin + GroupedNode := Tree.GetFirstChild(ObjectNode); + while Assigned(GroupedNode) do begin + GroupedObj := Tree.GetNodeData(GroupedNode); + if GroupedObj.IsSameAs(Obj) then begin + Result := GroupedNode; + break; + end; + GroupedNode := Tree.GetNextSibling(GroupedNode); end; - GroupedNode := Tree.GetNextSibling(GroupedNode); end; ObjectNode := Tree.GetNextSibling(ObjectNode); @@ -9911,10 +9913,17 @@ procedure TMainForm.DBtreeInitNode(Sender: TBaseVirtualTree; ParentNode, Node: Columns: TTableColumnList; function TreeShowColumns: Boolean; + var f: TWinControl; begin - Result := Item.NodeType = lntTable; - if Sender = DBtree then // optional in dbtree - Result := actTreeShowColumns.Checked; + Result := False; + if Item.NodeType = lntTable then begin + if Sender = DBtree then // optional in dbtree + Result := actTreeShowColumns.Checked + else begin + f := GetParentFormOrFrame(Sender); + Result := Assigned(f) and (f is TfrmSelectDBObject); + end; + end; end; begin @@ -10343,8 +10352,10 @@ procedure TMainForm.DBtreePaintText(Sender: TBaseVirtualTree; const if DBObj.NodeType = lntColumn then begin ParentObj := Sender.GetNodeData(Node.Parent); Columns := ParentObj.TableColumns; - Datatype := Columns[Node.Index].DataType; - TargetCanvas.Font.Color := DatatypeCategories[Datatype.Category].Color; + if Columns.Count > Node.Index then begin + Datatype := Columns[Node.Index].DataType; + TargetCanvas.Font.Color := DatatypeCategories[Datatype.Category].Color; + end; end; end; 1: begin // Grey out rather unimportant "Size" column