113 Commits

Author SHA1 Message Date
0d9de512cd Remove unit scopes from project settings, prefer fully qualified unit names in uses clauses. Enhance readability and compiler performance. 2022-12-26 17:59:19 +01:00
d5f50d710c Fix crash after copying table to other database, when target database is expanded in DBtree and current session has a background color. Closes #1597 2022-05-30 21:43:47 +02:00
25d15d8b41 Optimization: set up a single TSynMemo instance instead of all, e.g. when creating a new query tab 2022-05-25 13:16:27 +02:00
a6ad041a7c Convert hardcoded MySQL error codes to named constants, taken from include/mysql/server/mysqld_error.h 2022-04-23 11:45:37 +02:00
c4085bed4e Refactor: move structures for specific network types out of dbstructures, into their own dbstructures.xxx.pas, and include const.inc in project sources 2022-04-23 11:38:26 +02:00
d46716ff2e Issue #1503: reactivate DPI awareness, and try to read/write component dimensions DPI independently 2021-12-26 13:06:24 +01:00
cb1024b048 Fix more potential theme related EAccessViolation's, due to Action:=caFree in OnClose event of modal forms. Their caller now frees these modal forms. In non-modal forms, keep caFree in OnClose but remove existing OnDestroy events, moving code to OnClose instead.
https://www.heidisql.com/forum.php?t=38043
https://stackoverflow.com/questions/2075405/how-to-close-non-modal-form-in-delphi
2021-06-22 20:37:34 +02:00
28d25e3334 Revert a144466e7137f1c33c39c231dbeb4cd98dfc4ffa : query exact row count from tables and views. See https://www.heidisql.com/forum.php?t=37983 2021-06-10 07:42:50 +02:00
a144466e71 Experimental: query exact row count from tables and views, in data tab and table tools 2021-06-03 09:27:13 +02:00
8b548862de Prefer String.IsEmpty over self-baken IsEmpty(String) 2020-07-04 08:12:17 +02:00
4a440229a4 Use TDBObject.TableColumns for views as well, handle these like tables. Fixes crash when editing view data, when trying to create a table copy of a view, and some more. 2020-02-02 16:35:10 +01:00
103a61dc52 Issue #12: fix row count always -1 on SQLite, in "copy table" dialog 2020-01-22 13:04:39 +01:00
d5e5a8292d Issue #12: remove "database." part from reference table in foreign key code, as this throws an error: near ".": syntax error. Makes "Create table copy" dialog compatible to SQLite, except for indexes yet 2020-01-19 20:45:34 +01:00
340cd5066c Unify name and case of information_schema, per connection. Finally. Closes #855 2020-01-16 08:03:20 +01:00
b45a0d57c7 Issue #12: Implement TDBConnection.GetTableColumns and .GetTableKeys (todo: .GetTableForeignKeys), as a replacement for the error prone ParseTableStructure. SQLite columns and keys should be parsed correctly now, MS SQL and PostgreSQL may now have some glitches to fix. 2020-01-08 15:28:36 +01:00
17e75e70da Refactor: rename helper function sstr() to something more readable, and optimize it slightly 2019-11-04 20:15:41 +01:00
63fdc3e08c Move workaround for broken split buttons after translation into TExtForm.Create, so we have it once and the caller does not need to care about it. See https://sourceforge.net/p/dxgettext/bugs/80/ 2019-07-23 13:36:56 +02:00
fcdf323086 Let TExtForm translate all strings on a form, to reduce the code in any FormCreate event 2019-07-21 20:12:13 +02:00
88a9e53f0d Remove remainders of DPI related code, and move TExtForm.AddSizeGrip procedure to property .HasSizeGrip. Uses TSizeGripXP instead of TSizeGripThemed, as this looks quite the same. 2019-07-21 19:44:05 +02:00
c31cae2060 Giving up on high DPI readiness - remove tweaks which mostly don't work as expected, and even differently on various computers. Instead, let Windows blur fonts. 2019-07-18 20:53:53 +02:00
92c8f62b85 High DPI:
* remove ParentFont flag from forms again (introduced in 9cdcd631454f6f9e999893ea89fcf502d994474c for #213). This just inherits from default Windows settings.
* instead, scale font size in InheritFont(), and move that to the new TExtForm class
* mark app with PerMonitorV2 support
2019-07-17 21:59:18 +02:00
2a91a13b42 Issue #677:
* drop workaround for application crash on WinXP, when loading newer libmariadb (see #79)
* raise TDbLib's own exception instead of baking an own one with less details. Probably helps in debugging: https://www.heidisql.com/forum.php?t=34044
* rename EDatabaseError to EDbError, to overcome naming conflict in DB unit
* load libpq.dll always with path, which should anyway work better than without it. See http://www.heidisql.com/forum.php?t=22514
2019-07-08 20:23:05 +02:00
4f9613b05c High DPI: fix growing window dimensions on each opening. Related to #378 2019-07-07 21:22:19 +02:00
cdb10d8005 Required code updates for recent VirtualTreeview update 2018-12-11 21:50:26 +01:00
1a032ef726 When copying a table, use a column for the INSERT..SELECT query only if it's not a virtual one. Closes #84. 2018-12-11 20:30:20 +01:00
2a10422373 Issue #8: provide two color presets for SQL editors in preferences dialog per dropdown, one for dark themes and one for light ones 2018-11-05 20:53:43 +01:00
3759611c34 Issue #8: convert system colors applied by code into their theme color 2018-10-27 17:47:16 +02:00
9cdcd63145 Issue #213: Assign system or custom font once, to the application, and let all forms inherit that font, so there is no need to call InheritFont() for each form. 2018-10-25 19:24:45 +02:00
f7b4d0c0b8 Try the same workaround for invisible or black dropdown buttons on Wine as previously only for dropdown toolbuttons (becd4bdd0e3845f9ad7845fe7637460914878afa and 61202be058cc135f938a131207f47f9546efff26). Probably fixes issue #94. May also not fix it, as the toolbutton issue was not only on Wine. 2018-02-03 22:47:29 +01:00
5a8a4af29a Rename helpers unit to apphelpers, to overcome a naming conflict with the FireMonkey unit FMX.Canvas.GPU.Helpers. Closes #102. 2018-01-22 19:48:17 +01:00
d4b294f35a Support auto_increment flag on indexes other than primary or unique, on copy table dialog. If that still fails, give the user a hint to select the right index. See https://www.heidisql.com/forum.php?t=23383 2017-02-28 19:23:57 +00:00
7d661df417 Fix SQL error in "Copy table" dialog, in PostgreSQL mode. Use lowercase table and column names in IS.TABLES, so PG can find them. See http://www.heidisql.com/forum.php?t=18847 2015-07-08 16:02:44 +00:00
6e608f157e Replace out-dated code which does not compile in 64bit mode in helpers.SetWindowSizeGrip. Use a TForm descendant in the new unit "extra_controls". Code parts taken from http://www.delphigroups.info/2/4/326787.html 2013-11-01 14:54:13 +00:00
58b2a66800 Get column names from VIEW per IS.COLUMNS, not per SHOW COLUMNS, to support MSSQL here. Fixes empty grid results for MSSQL VIEWs. See comment #46 of issue #3212. 2013-08-05 04:15:01 +00:00
d0491f5737 Support auto_increment flag on unique key columns, in copy table dialog. Fixes issue #3250. 2013-06-25 04:17:51 +00:00
8e02fa9fee Move helpers:GetIndexIcon to TTableKey.GetImageIndex 2013-06-25 04:15:11 +00:00
e5486ebc5e * Avoid calling TDBConnection.ClearDbObjects() on active database after copying table. Instead, call actRefresh which takes care of a probably opened table object in the table editor.
* Check for table existence via SELECT on IS.TABLES, avoid usage and refresh of db objects here also.
* Fixes issue #3250.
2013-06-24 04:56:24 +00:00
ea0675bcb5 Copy table dialog:
* Clear db cache only once in btnOKclick
* Clear db cache of target db when done, instead of refreshing active db
* Remove unused variables
* Remove empty comment clause from CREATE TABLE code
2013-06-22 05:45:11 +00:00
56b6e103a0 Introduce TDBConnection.FindObject(db, obj). Use that in TDBConnection.QuotedDbAndTableName() and for checks for table existence. 2013-06-22 05:35:36 +00:00
6371ff5557 Issue #3212: Introduce TDBConnection.QuotedDbAndTableName(), callable with a db and table string. Internally calls TDBObject.QuotedDbAndTableName(), so we get the schema between db and table if required. 2013-06-22 04:45:53 +00:00
645a9f3c7f Make message strings from const.inc translatable 2012-11-29 06:15:44 +00:00
9d8b4cd83a Make more inline strings translatable. 2012-11-28 23:27:31 +00:00
f96288fce9 Translate string variables and literals in .pas files. TODO: translate constants. 2012-11-26 05:44:01 +00:00
ca1d94c87b Issue #557: Include gnugettext.pas from https://dxgettext.svn.sourceforge.net/svnroot/dxgettext/trunk/dxgettext/sample/ . And add basic code to all FormCreate events to translate their components in the future. 2012-11-10 14:28:44 +00:00
2b0a31194d AUTO_INCREMENT attribute requires a primary key on the same column. So, in the copy table dialog, if the user unchecks the primary key, we need to auto-remove the AUTO_INCREMENT attribute as well. Otherwise the dialog runs into an error "there can be only one auto column and it must be defined as a key". See http://www.heidisql.com/forum.php?t=11238 2012-10-03 09:22:53 +00:00
65a9011206 Give both dropdown and edit box the same width. See http://www.heidisql.com/forum.php?t=11039 2012-08-22 16:50:26 +00:00
90ab0b6cf1 Refactor logic for reading and writing application and session settings:
* Introduce TAppSettings, created in dpr file
* Implement read and write methods, and replace callers of GetRegValue and MainReg.WriteInt/... with these
* Optimize read and write methods for avoiding redundant accesses to registry
* Auto-remove stored default settings from registry to avoid registry spam
* Replace synced MainForm.pref* variables with TAppSettings.Read* calls
* Move SetLocales call to dpr file
* Move MainForm.FDirname* variables to appropriate methods in helpers.pas
* Implement TQueryHistory.Create(SessionPath), reading its items within constructor
2012-08-19 10:55:08 +00:00
5e8bf8306a Remove unused unit inclusions, detected by CNPack/Uses cleaner 2012-05-01 08:34:12 +00:00
ba14143238 Export whole CREATE VIEW code, not only the VIEW body. Fixes issue #2625. 2012-02-04 06:52:21 +00:00
3c725b3d76 Quote collation clause in all places. Fixes issue #2479. Related: issue #1852. 2011-06-27 19:44:07 +00:00