Commit Graph

47 Commits

Author SHA1 Message Date
Ansgar Becker
cc84963b25 Implement a dialog for easier accessing the options for ordered columns.
This has one positive side effect: ViewData no longer re-saves an ORDERCLAUSE to registry after it has been read. At the same time the ORDERCLAUSE is read everytime when grid is filled, not only the first time. Those changes were needed to be able to apply an ORDERCLAUSE which was generated and saved by the new dialog.

Left for later: Moving order-columns up and down. Tested that with a TUpDown which seems to ignore clicks sometimes and then doesn't fire OnClick.
2007-07-12 22:33:59 +00:00
rosenfield
4d12bd3e42 Send focus back to query editor after a column name has been double clicked into it. 2007-07-12 09:54:59 +00:00
rosenfield
2c0caa154d Bugfix: 'stop on errors when executing sql batch' got broken in revision 667. 2007-07-12 09:47:38 +00:00
Ansgar Becker
37f0b45363 Display rowcount statistics in a wordwrapped TLabel. Makes room for coming buttons "ORDER" (and "GROUP"). 2007-07-08 19:10:21 +00:00
Ansgar Becker
067cf4bf21 Stylechange: Get rid of some ugly WITH statements
Enhancement: Use ready to use function ToggleCheckListBox.
2007-07-07 19:11:53 +00:00
Ansgar Becker
40eb52729a Remove a done TODO-note 2007-07-07 18:54:32 +00:00
Ansgar Becker
6936031742 Replace a note on the loaddata-form about an unsupported feature by a simple version check routine which enables/disables the calling controls. 2007-07-07 18:51:02 +00:00
Ansgar Becker
2c3f1a02b4 Perform some check routines before enabling the "Import"-button. 2007-07-07 18:39:36 +00:00
Ansgar Becker
530d45a660 Reorder components on dialog for CSV-import and use the same pagecontrol-layout as on ExportSQL-dialog. 2007-07-07 18:28:22 +00:00
Ansgar Becker
1e6b065015 Fix rowcount statistics for pre-4.0 servers.
See also: http://www.heidisql.com/forum/viewtopic.php?p=1046#1046
2007-07-07 11:16:47 +00:00
Ansgar Becker
31c65c9e2f Display flash-icon in menuitems for functions. 2007-07-06 22:10:12 +00:00
Ansgar Becker
86f01b4675 Attach server version to SQL functions and use that to hide unsupported functions in query helpers, popupQuery and SynCompletionProposal. 2007-07-06 22:07:05 +00:00
Ansgar Becker
fa46bd85c8 Add functions from help categories "Geometric feature" and "Functions and Modifiers for Use with GROUP BY". Always use names of root categories, as we don't need a tree structure here. 2007-07-06 21:29:47 +00:00
Ansgar Becker
5207ec37a7 Move popupmenu main.SQLfunctions to childwin.popupQuery. So every new created MDI-child get its own instance of this popupmenu. 2007-07-06 19:10:04 +00:00
Ansgar Becker
5d82d7661f Fix AV after unsuccessful table renaming. 2007-07-06 06:01:23 +00:00
Ansgar Becker
bf68e4433c Improvements for CSV import dialog:
* Add feature: Read and write all options from / to registry, using some existing CSV-options
* Fix bug: Correct escaping for db, table, columns, values for terminator, etc.
* Style change: Drop superflous checkboxes from checkbox/edit pairs to save clicks. Checking for empty edits has the same effect.
* Style change: Don't convert backslashes in filename to slashes. No need to take care of escaping, esc() does that better.
2007-07-05 19:45:18 +00:00
Ansgar Becker
8bc4e646f3 Sanitize default component names. 2007-07-05 18:49:56 +00:00
Francisco Ernesto Teixeira
feb47109f5 Code rearrangement. 2007-07-05 13:01:54 +00:00
Ansgar Becker
69e1abbf43 Implement an up-to-date list of MySQL functions in mysql.pas. Used for
- popupmenu in query memo
- query helpers
- SynCompletionProposal
Drops function.txt and parser for that file.

Pros:
- No dependency on this file anymore
- Much easier and safer coding
- File-parsing no longer needed

Notes:

The old function.txt was meant to be editable and extensible for users but I never saw or heard anyone who does that, most likely because it wasn't documented. Another problem was that the file resided in the programs-directory, where only administrators have write-access, so in these cases it couldn't be edited anyway.

The PHP file in /extras can be used for creating an up-to-date list for mysql.pas .

As not all functions of the new list are available in all mysql-versions, it would be the best if we would fetch the list by the use of HELP commands. Contra: Would result in poor performancing popupmenu and many servers don't have the help-tables filled.
2007-07-04 22:31:56 +00:00
Ansgar Becker
01c66955f6 Important followup to last commit: Makes EnsureActiveDatabase accessible in other units. 2007-07-04 20:19:36 +00:00
Ansgar Becker
efcc58f7bb Fix firing queries on correct DB when user selects another DB in "Source" tab. Broken in rev 687. 2007-07-04 20:10:39 +00:00
Ansgar Becker
79c95bd9fd Move creation of SQLhelp from application startup to a place where it's done on demand.
Move public property keyword to the private context as it is no longer accessed from outside.
2007-07-03 20:22:49 +00:00
Ansgar Becker
c02ae7a711 Move creation of EditUserForm from application startup to a place where it's done on demand. 2007-07-03 19:41:15 +00:00
Ansgar Becker
6de920d8ec Move creation of CopyTableForm from application startup to a place where it's done on demand. 2007-07-03 19:35:09 +00:00
Ansgar Becker
bf73dadbd3 Move creation of printlistForm from application startup to a place where it's done on demand. 2007-07-03 19:31:06 +00:00
Ansgar Becker
fe6d534120 Move creation of loaddataform from application startup to a place where it's done on demand. 2007-07-03 19:26:17 +00:00
Ansgar Becker
3e2517ee6f Move creation of tablecomment from application startup to a place where it's done on demand. 2007-07-03 19:17:54 +00:00
Ansgar Becker
45d617c776 Move creation of tbl_properties_form from application startup to a place where it's done on demand.
Also removes a legacy procedure where that form was called, which is not linked to any control event.
2007-07-03 19:10:45 +00:00
Ansgar Becker
7a80a82f11 Move creation of CreateTableForm from application startup to a place where it's done on demand. 2007-07-03 18:25:25 +00:00
Ansgar Becker
ef08999839 OnlyDBs2 no longer needs to be public, since it's not accessed from selectsomedatabases-dialog. 2007-07-03 06:03:41 +00:00
Ansgar Becker
ce0956bf8f Drop dialog for selecting databases to display. As discussed it has no performance problem any longer to handle more than 50 dbs. 2007-07-03 05:53:29 +00:00
Ansgar Becker
003f0956aa Fix check for filled lboxQueryHelpers which prevented it from being updated with columns from new table. 2007-07-02 19:18:20 +00:00
Ansgar Becker
aeb7be0a37 * Fix hint for SQL functions menuitems which have pipes in declarations (fx TRIM).
* Fix splitting of function descriptions by implementing + using LastPos()
2007-07-02 19:08:59 +00:00
Ansgar Becker
4b168a9587 Remove superflous call to Items.Sorted. 2007-07-02 07:50:42 +00:00
Ansgar Becker
22adaf2439 Remember last selected item in query helpers tabs. 2007-07-02 06:23:41 +00:00
Ansgar Becker
7d8bd255ff We rely on OnDragOver checking for valid source controls. So, add a default insertion text for situations in which all typecastings fail. This text should never be visible. 2007-07-02 06:09:07 +00:00
Ansgar Becker
5cbebfe42c Implement query helpers: Columns, SQL functions and SQL keywords, presented in a listbox where they can be doubleclicked or dragged to insert into query-memo.
As a benefit, function.txt is read into 3 stringlists at startup now: Names, Declarations and Descriptions. Used in SynCompletionProposal and to fill the above mentioned helpers-list.

Also fixes a minor issue in SynMemoQueryDragOver using an unset "Accept" var.
2007-07-01 23:29:42 +00:00
Ansgar Becker
134f23e82c Sanitize component names located in main pagecontrol. 2007-07-01 19:33:31 +00:00
rosenfield
c79febe7b4 Defer execution of TDataSet Post() and ExecSQL() to background thread. 2007-06-30 00:25:11 +00:00
rosenfield
fca0840aa3 Add code comments. 2007-06-29 16:37:01 +00:00
rosenfield
5d2823143e Bugfix: Fix AV when executing a query that doesn't return results. 2007-06-29 16:28:50 +00:00
rosenfield
a3c48969d9 Fix repeated queries when navigating the tree view.
* Remove feature: columns listed in tree view (helps fix repeated queries; need to cache these and move to different GUI location)
 * Remove feature: SELECT COUNT(*) on all tables with MySQL < 3.23 (performance killer)
 * Add feature: Cache table lists for tree view (improves performance and fixes repeated queries)
 * Add feature: Master refresh button clears entire table list cache.
 * Add feature: Refresh button in table list view popup clear table list cache for database being viewed.
 * Add feature: Restore active database after user queries.
2007-06-29 16:13:42 +00:00
Ansgar Becker
dba536338c Implement a caching mechanism which avoids tons of "SHOW COLUMNS FROM xyz" queries when navigating in the users-tree. 2007-06-28 23:52:19 +00:00
Ansgar Becker
4d8c8114b0 * Fix AVs when setting "Active" property on not assigned TDataSet-objects. Call graceful FreeAndNil instead.
* Move ZQueryColumnNames from the global context to the local procedure where it's used.
2007-06-28 23:29:28 +00:00
Ansgar Becker
76bc0ddb8f Fix exploding enum-values, which get displayed as dropdown-items in datagrid. Broken in rev 620 ... 2007-06-28 22:05:19 +00:00
Ansgar Becker
36d9603f3c Remove all remaining ExplicitXYZ properties.
Wrote a small console app which removes these properties automatically in a given directory. Feel free to download it at http://www.heidisql.com/files/explicit_sucks.exe and use it before committing *.dfm files.
2007-06-28 21:55:57 +00:00
Ansgar Becker
3c8f123a81 Move *.pas, *.dfm and *.inc files from root directory to a new "source" subdirectory. Leaving just the readme in the root to give all newbies a very clear and unique starting point. 2007-06-28 20:00:04 +00:00