I do not see how the data set is based on the form / query / table / etc. will be faster or slower than created in code. However, I like to introduce them into the code, as it is easier to maintain. I saw screens with SQL embedded in the component, and then it was redefined in the code. Then I have to stop and research to determine which SQL is actually acting. Sometimes SQL in a form is good, sometimes it is used for a while, and then pushed by the code, sometimes it is never active, and SQL in formcreate. So I have to determine if this is by design or just sloppy leftovers. In addition, it is easy to skip SQL changes in code reviews if they are in .DFM and not in .PAS. those. I don’t always look at .DFM, because I don’t care if the label has changed or the button is pressed.
So, while prototyping is good when it comes to production code, you better have all the database logic (SQL, tables, and field definitions) in your .pas file.
Update: I finally gave CnPack . Among dozens of goodies is a brilliant tool called "convert selected components to code." Form Wizard | More details ... | Convert selected components to code. He does everything for you.
Chris thornton
source share