A new feature has been added to SqlQuery.
One-To-Many browses.
It now does One-To-Many relations between windows. No special indexes are required.
Everything is done using SQL statements to send messages between windows.
When an item is double-clicked in a parent window, a message is sent to the child window
(even though it runs in another thread) to re-execute the SQL for that window with and
addition to the WHERE clause. This addition passes the value in the key field of the parent
window to the key field of the child window. This works with even with no indexes and it
works with any kind of connection (ODBC,ADS,PG).
Setting a link between 2 windows is simple:
1. Click on the LINK button of the parent window.
A sub-window will appear with a browse of the parent fields.
2. Click on any child window.
The fields of the child window will appear in the sub-window.
3. Pair the parent field name to the child field name by clicking in both browses.
4. Click OK.
Test the link by double-clicking parent items to see the child window get refreshed with
related items.
This One-To-Many can be saved to the VIEW dictionary by simply clicking on LINK again
and selecting Save to Views. The select statements, field relations and the window
coordinates will be saved.
- SqlQuery7.JPG (306.95 KiB) Viewed 10494 times
To restore the view with relations and window coordinates, select
Execute this View
from the tree menu.
- Sqlquery6.JPG (294.37 KiB) Viewed 10494 times
http://bb.donnay-software.com/sqlquery/sqlquery20.zip
http://bb.donnay-software.com/sqlquery/sqlquery19.zip
The next update will include the ability to link a parent to 2 child windows with separate
link fields or to link windows in a daisy-chain.