Code to create Persistent Field components associated with TDataSet
问题 Looking for some example code illustrating how to create at runtime TField Components associated with a dataset. In the IDE, if you plop down a dataset component, right-clicking brings up the fields editor that provides this functionality at design time. Have not been able to find code showing how to do it at runtime. TIA 回答1: Each field type has a Create function that you pass the DataSet to that creates a field of that type and adds it to the Fields. From the help for DB.TStringField.Create