Many thanks to everyone for your great insights and contributed scripts!
I've looked and done some tests with Derek's treeview music m.zip script version from sparrow.
Here is my latest modification:
paste.c-net.org/GatherLimited
In summary, I added a GroupBox3 to the form and tried modifying the script
by adding a SQL command to the top level tree node { to execute when clicking the "MUSICIANS" treeview Menu }.
The idea would be to ouptut the Musicians names matching the SQL command inside the
Memo3 field in the GroupBox3, upon clicking the MUSICIANS treeview entry.
I tested the following query which returns a " not enough actual parameters at 38.18" error:
ibb.co/JRmPpZK
SQLQuery('SELECT mname FROM musicians WHERE musicians.id in (select Alb_info.id_musicians from Alb_info where Alb_info.Year = "1978")');
{ SQLQuery("SELECT musicians.mname FROM musicians, Alb_info WHERE Alb_info.id = '1978' "); }
{ SQLQuery('SELECT id_musicians FROM Alb_info where Alb_info.Year = "1978" '); }
{ SQLQuery('SELECT * FROM musicians'); }
Form1.Memo3.Text := Results.FieldByName('mname').AsString;
I also tested the other commented out SQL commands above which return the same error.
I could not find a solution or helpful suggestion online to this issue despite finding some good resources
stackoverflow.com/questions/10829812/sql-query-where-value-of-another-table
codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins
stackoverflow.com/questions/5446778/select-from-one-table-matching-criteria-in-another
Is there some specific SQL syntax to MVD I'm missing? If so could any one point me toward the relevant documentation on this topic?
Else any suggestion about likely SQL syntax or logic error pointer would be very appreciated.
The SQL command above should return the Musician name according to the
search criteria matching the id_musicians value from both tables,
but based on the corresponding Year field/colum value matching the 1978 value.
RUST NEVER SLEEP should be returned for that example.
ibb.co/XLfCvFH
The idea would be next to expand this query to match any "tag" / string value from a given column/field
to replicate the original project.
And ultimately try to do the same with a second treeview instead of a memo3 field to get the final result
of selectable record from the created groups, if possible.
Many thanks again for your next suggestions!
Regards,
Frank