⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tdataset_fields.htm

📁 Absolute Database 5.12 src. Absolute Database lets you forget the Borland Database Engine (BDE). Th
💻 HTM
字号:
<html>
<head>
   <title></title>
</head>

<!--#include virtual="/inc/header.php"-->


<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF">
  <tr>
    <td align="left">
      
<span style="font-family:Helvetica,Arial; font-size:12pt; color:#000000"><b>TDataSet.Fields
<br>
</b><span style="font-family:Helv; font-size:9pt; color:#000000"><span style="font-family:Helv; font-size:9pt; color:#7F0000"><a href=tdataset.htm>TDataSet</a></span></span><span style="font-family:Helvetica,Arial; font-size:12pt; color:#000000"><b>
<br>
</b></span></span>
    </td>
    <td align="right">
     <font face="Arial" size="2">
     
     <a href="overview.htm">Top</a>&nbsp;
     
     </font>
    </td>
  </tr>
</table>
<br><br>



<span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">Lists all non-aggregate field components of the dataset.
<br>

<br>
<b>property</b> Fields: TFields;
<br>

<br>
<b>Description</b>
<br>
Use Fields to access field components. If fields are generated dynamically at runtime, the order of field components in Fields corresponds directly to the order of columns in the table or tables underlying a dataset. If a dataset uses persistent fields, then the order of field components corresponds to the ordering of fields specified in the Fields editor at design time.
<br>

<br>
When ObjectView is True, the fields are stored hierarchically, meaning any child fields of an object field are referenced by the object field and don't appear sequentially after the object field in the TFields.Fields array. When ObjectView is False, the fields are stored sequentially, or flattened out, meaning any child fields of an object field are stored sequentially in the TFields.Fields array.
<br>

<br>
Accessing fields with the Fields property is useful for applications that:
<br>

<br>
Iterate over some or all fields in a dataset.
<br>
Work with underlying tables whose internal data structure is unknown at runtime.
<br>

<br>
If an application knows the data types of individual fields, then it is able to read or write individual field values through the Fields property. For example, the following statement assigns a field value to the Text property of an edit box:
<br>

<br>
Edit1.Text := CustTable.Fields.Fields[6].AsString;
<br>

<br>
<b>Note:</b>&nbsp;&nbsp;&nbsp;
<br>
The preferred method for retrieving and assigning field values is to use persistent fields or the FieldByName method.
<br>

<br>
The next statements assigns a value from an edit box to a field:
<br>

<br>
CustTable.Edit;
<br>

<br>
CustTable.Fields.Fields[6].AsString := Edit1.Text;
<br>

<br>
CustTable.Post;
<br>

<br>
<b>Note:</b>&nbsp;&nbsp;&nbsp;The AggFields property is a collection of all the dataset's aggregated fields. Thus, AggFields and Fields are mutually exclusive collections of the dataset's fields. These two properties contain all of the dataset's fields between them.
<br>
</span>

<!--#include virtual="/inc/footer.php"--> 
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -