67 Commits

Author SHA1 Message Date
f2cc5124d3 Restore previous scroll position after saving routine, trigger, event or view. See https://www.heidisql.com/forum.php?t=40291 2023-01-26 09:57:42 +01:00
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
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
e27d9c1b96 Refactor: create and use self explanatory TDBObjectEditor.ObjectExists method 2022-04-22 12:42:37 +02:00
12d8418856 Move upper controls on view editor into a first tab of a new page control, and show CREATE code on a second tab. Closes #1135 2020-12-19 10:26:04 +01:00
05d02627f3 Make TConnectionParameters.IsMySQL specific to MySQL only, and rename the grouped type checks to IsAnyMySQL, IsAnyMSSQL etc. This way the status bar now shows "MySQL", not "MySQL or MariaDB" 2020-02-22 09:06:37 +01: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
1c39075d7c Issue #852: Implement Assign method on TTableColumnList and friends, TDBObject.LoadDetails and .UnloadDetails, and cross fingers that assigning details to Mainform.FActiveDbObj reduces the number of internal queries 2020-01-16 07:40:30 +01:00
2f2eba6e56 Disable some controls on VIEW editor, which the underlying server does not support, and don't generate SQL clauses for these. Closes #39. 2019-12-03 20:47:24 +01:00
db9e76bd78 Move code from TDBObjectEditor.GetDefiners to new TDBConnection.AllUserHostCombinations 2019-07-22 07:44:19 +02:00
71d9ef9011 Same as for TExtForm: translate in TDBObjectEditor.OnCreate, not in all derived editor classed 2019-07-22 07:28:07 +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
1d6a415f5f Refactor: rename mysql_structures unit neutrally to dbstructures 2019-06-22 14:26:41 +02: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
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
5312a37203 Support SQL security setting in view editor via drop down menu. See http://www.heidisql.com/forum.php?t=21740 2016-12-14 19:10:08 +00:00
e6e9560cf8 Open new help page on "Help" buttons of the various object editors. 2014-11-09 12:00:41 +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
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
5e8bf8306a Remove unused unit inclusions, detected by CNPack/Uses cleaner 2012-05-01 08:34:12 +00:00
bd8cc387ca Add context menu with copy, cut, paste and select all items to all db object editors which have a TSynMemo. Fixes issue #2765. 2012-03-24 22:20:09 +00:00
ba14143238 Export whole CREATE VIEW code, not only the VIEW body. Fixes issue #2625. 2012-02-04 06:52:21 +00:00
b5e28f43db Refreshing datagrid result while connection is cut triggers SelectedTableColumns to reset implicitly in ConnectionReady > DBTreeFocusChanged > ParseSelectedTableStructure. Add an explicit Connection.Ping(true) before firing any query in DatagridBeforePaint, and merge code from ParseSelectedTableStructure into DBTreeFocusChanges. Fixes issue #2644. 2011-12-14 21:11:51 +00:00
788e279fb8 Attempt to preserver original VIEW code, by selecting text from the server's .frm file. Fixes issue #2546. 2011-09-04 13:17:32 +00:00
2d548b5ef6 Introduce some wrapper functions for message and error dialogs in order to have less code and to avoid hidden titles on Windows XP. Fixes issue #2425. 2011-05-27 04:48:21 +00:00
4fbf2c23dd Introduce experimental MS SQL support 2011-03-29 23:20:21 +00:00
49a97584e6 Code preparation for non-MySQL connections: Extract abstract stuff into a new TDBConnection class, and let TMySQLConnection derive from that. Same with TDBQuery / TMySQLQuery. See issue #1008. 2011-03-17 23:03:54 +00:00
b50659135c Again, move code for loading libmysql.dll - the right place is now the connection object itself, which loads the library on demand, in SetActive(). This enables the application to start independently of an existent library, raising an error when pressing the connect button. Also, this is a first step towards multi-dbms. 2011-02-17 00:26:53 +00:00
6f95a796e1 Modify identifier quoting logic:
- Move QuoteIdent() and DeQuoteIdent() out of TMySQLConnection, make them classless
- Remove TMainForm.mask(), instead always use QuoteIdent()
- Introduce a third parameter to QuoteIdent(): "AlwaysQuote" - setting this to false will quote only if required
- Set AlwaysQuote to false for all stuff which drops some code into the query editor, see http://www.heidisql.com/forum.php?t=6986
2010-11-24 23:12:13 +00:00
6c2a100945 Implement combo box for definer in routine + view + trigger editor. Fixes issue #2189. Some related changes here:
- Remove ensureValidIdentifier() and its partly uncatched exceptions. Instead, disable "OK" buttons for empty table/view/proc name.
- QuoteIdent and DeQuoteIdent now take the glue char instead of a "HasMultiSegments" boolean param, so they're more exact when "user@host" or "db.name" come in.
2010-10-12 22:13:08 +00:00
5d13d0677b The 3 procedures Parse(Table|View|Routine)Structure() already do some connection specific stuff, and now even more, so they're moved to TMySQLConnection now. In order to display the right collation even if only the character set was found in a CREATE TABLE code, the default collation per charset is detected via CollationTable. See http://www.heidisql.com/forum.php?t=6348 . 2010-10-08 20:16:53 +00:00
0fa6c15c9d Implement multiple connections per window. DBtree and friends now have their nodes bound to TDBObject instances. Fixes issue #2144. 2010-10-05 23:06:29 +00:00
6fa29605fd SHOW VIEW may be not allowed. Disable VIEW editor in that case, but do not run regular expression into a no-match AV. Fixes issue #2159. 2010-09-08 19:48:18 +00:00
f323420ef1 Enable TDBObject instances to return and cache their own CREATE code, and replace various manual SHOW CREATE xyz occurrences with this new function call. Additionally, modify ParseViewStructure so it takes the CREATE code instead of just the VIEWs name, so it works similar to ParseTableStructure and ParseRoutineStructure. Finally, take this CREATE code to detect all settings for a VIEW, instead of taking them from information_schema.VIEWS. Fixes issue #2131. 2010-09-07 20:58:48 +00:00
b3b1710c35 Introduce EDatabaseError exception class, so we're able to handle only those and let others raise the exception up to MadExcept. Helps finding non-database related AVs as users are able to get the callstack now. Similar to r3292 but more consistent all over the code now. 2010-04-24 13:56:57 +00:00
604672f3d8 Attempt to slightly simplify logic for refreshing database tree node after adding/renaming a db object. 2010-04-18 23:15:20 +00:00
5f9129bef2 Implement event editor for MySQL 5.1+ servers. Also, simplify some code around database objects and their editors. Fixes issue #1527 2010-04-08 23:16:40 +00:00
45ba97b13f Add button and global action for executing selected functions and/or procedures by click. Fixes issue #1818. This requires some parsing code to be moved to helpers unit so it's also available in ListTables' context menu. Also, to avoid new AVs, any db object editor now focuses the edited object in the tree, which is important for creating new ones which were neither existant nor focused. 2010-04-04 22:33:12 +00:00
d35815de77 Code cosmetic: rename showstatus to ShowStatusMsg 2010-03-08 23:21:34 +00:00
fc6d4c2a48 Try to fix most DPI related glitches. Especially TFrames need a ScaleBy() call, which is done automatically on TForms. Fixes issue #1656. 2010-02-04 23:50:47 +00:00
91d53bbbcc Replace default value in object editors by ghosted hint text 2010-02-03 22:18:28 +00:00
d70ea85786 Ask user if in-memory modifications to table, view, trigger or routine should get saved, this time including a Cancel button, which cancels either
* focusing a different object in database tree and/or
* closing application
TODO: Internal switching to different connection probably needs that too?
2010-01-15 17:13:24 +00:00
a4652d39a4 * Fix compiler warnings due to implicit AnsiString to (Unicode)String or vice versa
* Remove workaround for Unicode text to and from clipboard
* Fix writing/reading wrong encoded text into/from registry - no need to use Utf8Encode() any longer
* Implement TMySQLQuery.ColAsAnsi() for cases in which we read binary data.
2010-01-07 00:00:56 +00:00
7d401ffde8 Upgrade to Delphi 2010:
* Removes TNT Unicode controls, which are no longer required. All VCL controls now have native Unicode support.
* Remove Delphi 11 packages, otherwise we would either need to keep TNT or break Unicode
* PngComponents update from Uwe Raabe on http://cc.embarcadero.com/Item/26127
* Adjust auto build process
* Since Delphi 2009, Strings are now UnicodeStrings, not AnsiStrings any longer. Fix a bunch of compiler errors which came along with this change.
TODO: Project should compile but give tons of compiler warnings.
2010-01-05 23:14:33 +00:00
eb9915d5be Invalidate columns and keys of an edited table when pressing the "Save" button, to avoid SQL errors when switching to "Data" tab. Fixes issue #1556 2009-12-22 23:38:38 +00:00
e356cb7ed7 Sanitize all "uses" clauses from unneeded unit references. 2009-12-22 23:19:56 +00:00
d1cc99e29f Fix staying hourglass mouse cursor when editing a view, routine or trigger. 2009-12-15 22:22:36 +00:00
dd398bb101 * Factor more code out of each database object editors into parent TDBObjectEditor.
* Use this chance to add a confirmation dialog when leaving the editors, to ask the user if he wants to save modifications. Fixes issue #1524.
* Also, enhance Mainform.RefreshTreeDB in a way that it does not trigger the OnFocusChange event. Important for the editors when saving changes.
2009-12-14 23:55:36 +00:00
8520f97fff Hack editor class descendants so that Delphi sees them as TFrame subclasses instead of TDBObjectEditor. Works around Delphi bug 73397 - see http://qc.embarcadero.com/wc/qcmain.aspx?d=73397 2009-12-13 14:29:18 +00:00