Wednesday, October 05, 2011

Firebird DB management tool (3) - Bells and whistles

After using the new tool for another few weeks, I discovered a problem with updating live queries. If the query returns more than one tuple, then an edited tuple will be automagically updated when one leaves the line. But if the query returns only one line, then there is no way of updating the tuple.

In order to address this issue, I added a speedbutton whose function is to call the 'ApplyUpdates' method of the query and so force the update. After doing this, I added another speedbutton whose function is to call the query's 'Delete' method, and after a few more minutes contemplation, I added an 'Add' button as well.

Once the brain was actively thinking about improving the program, a few more simple hacks popped into my mind. Double clicking the 'fields' combobox will add to the query text the current table and field combination (eg ACTIVITIES.NAME), whereas double clicking the 'tables' combobox will add the current table name only. These hacks will be useful when building queries - they save typing.

Here's a screen capture of the program as it looks at the moment

No comments: