Re: 1 Form containing more than 1 set
I have had a similar experience trying to get to grips with the restriction imposed by the simple set creation and, as a newbee, I am still at the experimental stage.
I have been used to Access and other 4GLs using SQL as the method of selecting the appropriate data for forms and sub-forms. With Access I would invariably need to use SQL commands to provide the data for sub-forms and dropdown fields, both of which would be tied or bound to data in the main form's table.
My first attempt at creating a desktop application in Alpha5 has had me stumped and I don't seem to be getting anywhere very fast.
My latest attempt has been to install the Visual Foxpro ODBC drivers (as recommended for ODBC access to the A5 DBF file tables - in another thread) and use an ODBC connection to the A5 tables in order to perform a SQL query on them. This I have then linked into a set to allow embedded browses of these sub-tables to be displayed on the form. Unfortunately, although it appears to work in theory it does not appear to work correctly and so is impeding any further progress along these lines.
The example I am trying to create is a Person table where I have a form with a tabbed control displaying the person's details on the first tab. Below this (or on a separate tab) I wish to display the person's children in a grid (browse control) and then on another tab display a grid of the person's siblings (denoting whether they are half or full brother/sister, along with other information from the sibling's Person record). This is all based on the one table (i.e. A linked list) which has a person_id field together with two other fields which contain the person_id of the person's mother and father respectively.
It does work, but not particularly cleanly. For a start, there is no access to the Alpha5 catalogue so the table names and column names and data types need to be pre-known when constructing the SQL and column names appear to be truncated to 10 characters. The data, although fine when looking at the ODBC Active Link tables, is getting repeated rows when shown in the browses (both the set's default form's browses and the form I have created). It appears to start off fine but as I move through the parent table's rows the sub-tables' rows get duplicated and on subsequent moves back to the same record (i.e. moving back to a particular record) more rows appear in the sub-table relating to that person than were there before.
It appears to be a bug.
Can anybody throw any light on a preferred, usable and clean way to achieve what I am trying to do?
I have had a similar experience trying to get to grips with the restriction imposed by the simple set creation and, as a newbee, I am still at the experimental stage.
I have been used to Access and other 4GLs using SQL as the method of selecting the appropriate data for forms and sub-forms. With Access I would invariably need to use SQL commands to provide the data for sub-forms and dropdown fields, both of which would be tied or bound to data in the main form's table.
My first attempt at creating a desktop application in Alpha5 has had me stumped and I don't seem to be getting anywhere very fast.
My latest attempt has been to install the Visual Foxpro ODBC drivers (as recommended for ODBC access to the A5 DBF file tables - in another thread) and use an ODBC connection to the A5 tables in order to perform a SQL query on them. This I have then linked into a set to allow embedded browses of these sub-tables to be displayed on the form. Unfortunately, although it appears to work in theory it does not appear to work correctly and so is impeding any further progress along these lines.
The example I am trying to create is a Person table where I have a form with a tabbed control displaying the person's details on the first tab. Below this (or on a separate tab) I wish to display the person's children in a grid (browse control) and then on another tab display a grid of the person's siblings (denoting whether they are half or full brother/sister, along with other information from the sibling's Person record). This is all based on the one table (i.e. A linked list) which has a person_id field together with two other fields which contain the person_id of the person's mother and father respectively.
It does work, but not particularly cleanly. For a start, there is no access to the Alpha5 catalogue so the table names and column names and data types need to be pre-known when constructing the SQL and column names appear to be truncated to 10 characters. The data, although fine when looking at the ODBC Active Link tables, is getting repeated rows when shown in the browses (both the set's default form's browses and the form I have created). It appears to start off fine but as I move through the parent table's rows the sub-tables' rows get duplicated and on subsequent moves back to the same record (i.e. moving back to a particular record) more rows appear in the sub-table relating to that person than were there before.
It appears to be a bug.
Can anybody throw any light on a preferred, usable and clean way to achieve what I am trying to do?
Comment