Since the TClientDataSet is already active (at design-time), you can immediately see the live data, as shown in Figure 2.
由于TClientDataSet 已经被激活(在设计时),您可以直接看到实时数据,如图 2 所示。
The TClientDataSet is only an in-memory table at the client side, and changes to this dataset will not be saved automatically.
TClientDataSet 只是在客户端的一个内存表(in-memory table),对该数据集的更改将不会自动保存。
The TClientDataSet component can be seen as an in-memory table that can be used as placeholder for records from other datasets.
可将TClientDataSet组件看作一个内存中的表,可以用作其他数据集中记录的占位符。
In order to actually work with the records in the TClientDataSet, you can use the data-aware controls in Kylix, found on the data controls TAB.
为了真正使用TClientDataSet中的记录,您可以使用Kylix中的数据感知控件,可以在DataControls选项卡中找到这些控件。
Assigning false to the Active property of the TClientDataSet does not do that by default - the connection is kept until you explicitly close it.
在默认情况下,将TClientDataSet的Active属性赋值为false并不会终止连接——在您显式地关闭连接之前,会一直保持该连接。
This will present the new form with data, since the TClientDataSet is activated just before the form is shown (and deactivated when the form is closed again).
因为就在显示该窗体之前激活了TClientDataSet(关闭该窗体之时再取消激活状态),所以该图将显示带有数据的新窗体。
Figure 3 shows the current user interface as it should appear in C++Builder 6 at design-time (note that the TClientDataSet is still active at this time, however).
图3展示了在设计时 C++Builder6中应该出现的当前用户界面(注意,此时 TClientDataSet仍然是激活的)。
You can now save the client projects, and compile and run them (make sure to set the Active property of the TClientDataSet to false, so it won't be open at design-time).
现在可以保存客户机项目,并编译和运行这些项目(要确保TClientDataSet的Active属性被设为false,这样它在设计时就不会被打开)。
Right after the TClientDataSet is activated, you can again walk through the set of field definitions; this time not only to obtain the field names, but also the field types.
在激活tclientdataset之后,您可以再次遍历字段定义集;只是这次不但要获得字段名,还要获得字段类型。
After that step, you can set the Active property of the TClientDataSet component to True, which will activate the SQL command in the TSQLDataSet component and make the data available.
在完成这一步骤之后,您可以将TClientDataSet组件的Active属性设置为True,这将激活TSQLDataSet组件中的SQL命令,使数据有效。
Although it's nice to see the data at design-time, I've also explained why it's better to set the Active property of the TClientDataSet to false (when saving and compiling the project).
虽然在设计时看到数据是件好事,但我也解释过为什么最好要将TClientDataSet的Active属性设置为false(在保存额编译项目时)。
Although it's nice to see the data at design-time, I've also explained why it's better to set the Active property of the TClientDataSet to false (when saving and compiling the project).
虽然在设计时看到数据是件好事,但我也解释过为什么最好要将TClientDataSet的Active属性设置为false(在保存额编译项目时)。
应用推荐