1. Overview Delphi as a rapid development tool under Windows, not only develops a general Windows application, but also has powerful database application development capabilities. Delphi itself provides support for several database drives for BDE, ODBC, ADO, and InterBase, which can meet the needs of different applications on database programs. However, when publishing a database program developed with Delphi, in addition to installing an application, it is necessary to simultaneously publish the database driver. This seems a bit of a bit of a lightweight feeling for some stand-alone applications that only involve only single or multiple simple table data stored. Moreover, some applications themselves need to store large amounts of data, but itself requires short-grade, and the method of using the Delphi regular development database cannot meet the needs. So, is there a way to solve the above contradictions, develop a "thin" database single-machine application that can be separated from the huge database driver? Delphi5 provides a TclientDataSet control in the MIDAS control panel, which can solve this problem well. Second, TclientDataSet uses the point TclientDataSet control inherits from TDataSet, and its data storage file format extension is .cds, which is based on file-type data storage and operation control. The control encapsulates the interfaces and functions of data processing, which itself does not rely on the above database drivers, basically meet the needs of the single "thin" database application. 1. TclientDataSet Basic Attributes and Method Introduction 1). FieldDefs: Field Definition List Properties Developers You can edit the button in this property in this control, or select the Fields Editor menu in this control to perform field editing. After setting this property, it is actually equivalent to defining the structure of the table; if you want to load the structure and data of the existing data table, you can select the "Assign Local Data" menu in the pop-up menu by clicking Right click. The dialog box is selected in the current form that has been connected to the database is available (the current form must be placed in a set of data set controls to be set and activated). Note: For a custom field name, the control is still not open after editing. Right-click on the control, select the "CREATE DATASET" menu in the pop-up menu, so that the control is based on the list of fields described above. After the data set is created, it can be activated and used. Otherwise, an error similar to "ClientDataSet1: Missing Data Provider or Data Packet" (including the CREATETASET method for the control can be called in the running period, "thereby dynamically defining the fields and tables). 2). FileName Properties Description: The name of the data storage file. Because the control is file-based, the data file name (default extension name .cds) must be specified, turn on and activate the control, and then perform data editing. Example 1: Using this property opens the specified .cds file varPath: string; begin path: = extractFilePath (Application.exename); // Get the executable file path CDataSet1.FileName: = Path 'Test.cds'; cdataset1.open END; 3). CreateDataSet Method Description: This method establishes a dataset in the field name table in FieldDefs, commonly used to perform dynamic definitions.