I am working on a form where the users can input data into two related tables, basically a master table and a detail table, the second with several records that relate to the master. On a similar program I had the details input into a grid related to a detail table query, and had procedures to post, update or delete the details as the users wrote, corrected and finally confirmed the inputs. Although it is working fine, it was quite complicated for me to write, and is a bit slow to operate. –I`m no expert.
Faced with a similar need now, and looking for a better road, and I am having the user input the detail data into edits, values going into a set of variable arrays that are displayed in a list view. Only when the user has finished adding and correcting all the details related to the main form record, and so confirms, the program will post the arrays to the detail table and apply the updates. Possible complication for me will be in all the code needed to keep the garbage and “un-post-able” inputs out early in the procedure.
I suppose there are other solutions, and that this is a rather common thing. Here is the question: ¿Is there a “best practice” or “standard” solution for this? I am programming in Lazarus and using a Firebird database, although in the first mentioned program I had to use the tables in an existing Access program.
Thanks.
Faced with a similar need now, and looking for a better road, and I am having the user input the detail data into edits, values going into a set of variable arrays that are displayed in a list view. Only when the user has finished adding and correcting all the details related to the main form record, and so confirms, the program will post the arrays to the detail table and apply the updates. Possible complication for me will be in all the code needed to keep the garbage and “un-post-able” inputs out early in the procedure.
I suppose there are other solutions, and that this is a rather common thing. Here is the question: ¿Is there a “best practice” or “standard” solution for this? I am programming in Lazarus and using a Firebird database, although in the first mentioned program I had to use the tables in an existing Access program.
Thanks.